CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

" getenv("AUART") "

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hope_485
Guest







" getenv("AUART") "
PostPosted: Fri Sep 26, 2008 8:45 am     Reply with quote

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







PostPosted: Sat Sep 27, 2008 2:49 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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