FreeEMS Issues - Firmware
View Issue Details
0000498FirmwareStructure / Stylepublic2012-01-04 13:002014-02-18 23:05
Fred 
Fred 
normalminoralways
assignedopen 
0.2.0-SNAPSHOT 
0.2.1 
Improvement
low
0000498: Remove all CLEAR_ flags and replace with a macro that clears
Current stuff is error prone and bad for maintenance with duplicated flag defines everywhere, yuck. Probably move to something like this:

SETBITS(variable, MASK);
CLEARRBITS(variable, MASK);

or

ENABLEBITS(variable, MASK);
DISABLEBITS(variable, MASK);

or similar.
No tags attached.

Notes
(0001096)
Fred   
2012-01-04 14:14   
OK, to do this properly there need to be three variants of each, 8, 16, 32 bits. Without this the best you can hope for is single bit, and not safely.

I'm hoping that it's possible to generate some sort of error if they are misused with the wrong type of input var. Quite possibly.