From: Peter S. <pet...@in...> - 2007-12-22 06:00:41
|
Guys (and gals?), I would like to modify the PIC16 usart function(s) to ease the use of the BRG16 bit. I thought up a few ways to do this: 1. Move all the baud rate determining code to a new baud rate function 2. Add the BRG16 enable/disable to the 5 of the "config" parameter In either case I would have to provide a way to disable this functionality for PIC16's that do not seem to have the BRG16 bit in their include files. I could: A. Add a #define such as "#define HAS_BRG16" to the applicable pic18fxx.h files and enclose BRG16 specific code in #ifdef HAS_BRG16 ... #endif B. Add a #define such as in pic16F688.h for the bits to the applicable pic18fxx.h files and enclose BRG16 specific code in #ifdef BRG16 ... #endif I would like to discuss/agree on a solution, make the changes on my sdcc-2.7.4 build setup, do some tests on my 18F2455, and submit the diffs for someone to merge. Please give me your thoughts on this issue... -- Peter Stephens pet...@in... |