I want to change my code along with Compiler library header files to have Misra-C Compliance.
For the following code, there is an Misra Violation saying that "There shall be no definitions of objects or functions in a header file". sfr P0 = 0x80; sbit P0_7 = P0^7;
And " ANSI C error: 'expression must have a constant value' " for sbit P0_7 = P0^7;
Please suggest an alternate method for implementing the above code?
Thank you.