J.C. Wren wrote:
In uart.h, the module enable is abstracted into U0ME. Shouldn't we do this for the interrupt bits (IE1 vs IE2, IFG1 vs IFG2) and add similiar defines for UART1, for the sake of orthagonality (or however you spell it...)?
the U0ME/U0IE defines are there because F123 and F13x/14x are not the same. but its often practical to be able to compile a program for both targets (e.g. during developement with a larger MCU that in the final product, same lirary sources for all targets, etc)
that is not the case with the uart1 as the only series with it is the F14x.
I find I have to have 2 uart0.c files, one for parts with a single UART, and another for those with dual UARTs, because the interrupt enables and such are different. I could put my own #defines around it, but that doesn't seem as clean as astracting it into uart.h
patches to uart.h are welcome ;-) if it makes sense we can incorporate them. chris