|
|
View previous topic :: View next topic |
Author |
Message |
hope_485 Guest
|
" getenv("AUART") " |
Posted: Fri Sep 26, 2008 8:45 am |
|
|
Somebody can give information about " getenv("AUART") " function,
#if getenv("AUART")
#define RCV_OFF() {setup_uart(FALSE);}
#else
#define RCV_OFF() {setup_uart(FALSE);}
#endif
I give this from RS485.c
thanks |
|
|
Ttelmah Guest
|
|
Posted: Sat Sep 27, 2008 2:49 am |
|
|
The 'getenv' function is documented, in the help for latter compilers, or in the 'readme.txt', if you have an earlier compiler.
As used here, it specifies if the chip has the 'advanced' UART fitted.
The code as posted, does nothing. It is a 'left over'. The same test function is used in several places to make little 'tweaks' to the way the UART is handled on chips with the advanced UART fitted. On early compilers, they didn't have the 'setup_uart(FALSE)' function, and instead did a bit access to turn off the UART, which changed with the different UART. Only a very few compiler versions latter, CCS added the option to turn off the uart, so the same code could be used for both UARTs, and they forgot to remove the test...
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|