??? 12/10/04 00:15 Read: times |
#82863 - Globals, ISRs, main, & static Responding to: ???'s previous message |
is it possible to share a global static varaible in the ISR and the main function? Maybe I'm not understanding what you want to do, but if you want to share a variable between an ISR and main wouldn't you just use a global variable? You can't pass parameters to ISRs, or receive a return value from an ISR, so the only way for an ISR to share data with the rest of the system is via "globals" If the ISR and "main" are in the same file, you can define the "global" as 'static' to confine its visibility to that file only. Maybe that's his idea? |
Topic | Author | Date |
89s52 function sharing. | 01/01/70 00:00 | |
Try This | 01/01/70 00:00 | |
emphasis | 01/01/70 00:00 | |
an idea... | 01/01/70 00:00 | |
Andy, I tried it | 01/01/70 00:00 | |
Jolly good! | 01/01/70 00:00 | |
Error | 01/01/70 00:00 | |
You need to work on it | 01/01/70 00:00 | |
reentrant ? | 01/01/70 00:00 | |
reentrant | 01/01/70 00:00 | |
non-reentrant | 01/01/70 00:00 | |
Wow | 01/01/70 00:00 | |
varaible sharing? | 01/01/70 00:00 | |
Variable sharing | 01/01/70 00:00 | |
Overflow | 01/01/70 00:00 | |
variables, main and ISR | 01/01/70 00:00 | |
Globals use more memory | 01/01/70 00:00 | |
Isn't that a global? | 01/01/70 00:00 | |
Globals, ISRs, main, & static![]() | 01/01/70 00:00 |