3

I would like to know how can I tell to compiler that a #define is an unsigned char.

#define SET_BITS_LOW 0x80

Here SET_BITS_LOW is, by default, an int but I want an unsigned char

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
VivienG
  • 2,143
  • 3
  • 24
  • 43

1 Answers1

7

You may try like this:

#define SET_BITS_LOW  ((unsigned char)0x80)
Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331