I have a question about the lpc23xx.h file version 1.04
I was wondering why some of the UART registers were defined as unsigned long, when they appear to only be 8 bits (unsigned char)? For example, the RBR, THR, DLL, DLM, FCR, LCR, LSR, SCR and TER registers for all the UARTS. Is there a reason for this, or was this just a cut and paste typo?
It is quite common that the developer selects the int or unsigned int data types. So it isn't an unreasonable assumption that the SFR can be accessed with 32-bit accesses. The chip designer have designed the chip to allow such accesses.
Anyway: The most general solution is to define two sets of definitions to access these registers, just as the GPIO ports has 8-bit, 16-bit and 32-bit access methods.