The below is a snippet of a code for operating SI4455 Rf module with Arduino. I have some doubts which I'd like to seek some help in clearing.

byte numOfBytes = *pSetPropCmd++;

    if (numOfBytes > 16u) // What does this 16u mean?
        /* Initial configuration of Si4x55 */
        if (SI4455_CMD_ID_WRITE_TX_FIFO == *pSetPropCmd) 
            if (numOfBytes > 128u) // What does this 128u mean?
                /* Number of command bytes exceeds maximal allowable length */
                return SI4455_COMMAND_ERROR;

            /* Load array to the device */
            WriteEZConfigArray(numOfBytes - 1, pSetPropCmd);

            /* Point to the next command */
            pSetPropCmd += numOfBytes - 1;

            /* Continue command interpreter */

In the above snippet, what does 16u and 128u mean?. I think its meaning u for unsigned, but still not clear as what does 16u and 128u mean.

Rgds VD


It means that it is a unsigned value. Because the compiler checks for signed and unsigned in the same operation this is used (amongst others) to avoid warnings.

This is explained on stackoverflow here https://stackoverflow.com/questions/14844119/define-foo-1u-2u-4u-what-does-1u-and-2u-mean

  • ok does it mean an unsigned int with a decimal value 16 for 16u and unsigned int with a decimal value of 128?. And is it valid to perform "numofBytes > 128u" check in the snippet, since numofBytes is a byte?
    – PsychedGuy
    Jul 24 '16 at 13:32
  • Please ckick the answer is usefull :-)
    – jantje
    Jul 24 '16 at 14:29
  • The u just types the value as unsigned. You also have f which is float. which makes 1.0 and 1f the same thing.
    – jantje
    Jul 24 '16 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.