Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/01/02 13:48
Read: times


 
#22359 - RE: passing port pin (to Mahmood)
Why not to write instead of a doubtful construction
DGIO_setDiscrete(RedLED, ON); //your example 
a simple expression 
RedLED = ON;

It's called encapsulation. Imagine you found the LED flickering occasionally. With the RedLED = ON construct, you could not set a break point and do a stack back trace to see who the caller was. Only use direct hardware access like this when performance is critical and you are very careful.

List of 25 messages in thread
TopicAuthorDate
passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin (to Bert)            01/01/70 00:00      
RE: passing port pin (to Bert)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood) J.            01/01/70 00:00      
RE: passing port pin (to Mahmood) J.            01/01/70 00:00      
RE: passing port pin (to Mahmood) J.            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      

Back to Subject List