Adapting sbit for GCC

428 Views Asked by At

I'm writing a test harness for some C modules, one of which contains the "sbit" keyword. The code was initially written for the Keil C51 compiler, where sbit is used to define a bit within an sfr, more information here. However, I'm writing the test harness using GCC, where sbit isn't defined. I've tried every combination of static, const, int, and bool, none of which seem to satisfy the compiler. #define doesn't work either, because these variables are assigned values further down in the code.

There was a similar question on this site that suggested that sbit might be too low level for GCC. In any case, is there something I can do to get around this?

0

There are 0 best solutions below