??? 06/27/09 08:02 Read: times |
#166518 - I didn't say that Responding to: ???'s previous message |
Giang Ho said:
Thanks Andy, I only call from ISR during testing because it can provide delay time between sending. Take a look at this thread for an example of doing a "software" delay timer: http://www.8052.com/forum/read/166323 why I can not call printf in any where rather than in main() or interrupt ??? I didn't say that. I said you can't call it from an ISR and any other part of your program - there is no particular restriction to calling only within main. The point is that printf is not reentrant; therefore it must not be called simultaneously from multiple places. In fact, unlike "normal" 'C' compilers, functions in Keil C51 are inherently not reentrant - so you can't call any C51 function simultaneously from multiple places. |