question about bit names
Posted: Mon Jan 09, 2017 12:07 pm
I was thinking about adding the option of having the SystemConvert utility add register bit definitions to the output files, something like
This is already being done for the asm .inc file but those bit names aren't visible to the .bas modules. 'Bit names' would be a misnomer since they're actually the bit number, but it'd give you the definitions so you could do things like 'ADCON0.bits(ADON) = 1' or ' if ADCON0.booleans(GO_DONE)', etc.
Any reason why these shouldn't be added to the existing device .bas file, or would it be better to create a new file (say "P18F26K22.bas") with the definitions? Any preferences one way or the other?
Code: Select all
// ADCON0
public const
ADON = 0,
GO_DONE = 1,
CHS0 = 2,
CHS1 = 3,
CHS2 = 4,
CHS3 = 5,
CHS4 = 6
Any reason why these shouldn't be added to the existing device .bas file, or would it be better to create a new file (say "P18F26K22.bas") with the definitions? Any preferences one way or the other?