Well,  where interrupts are involved,  NEVER assume something about how the 
code SHOULD/MIGHT be working.  It is easy enough to disable interrupts before 
accessing the volatile variables and restore them afterwards.  This is by far 
the simplest and most reliable way to do it correctly (no messy message 
passing/semaphores/smoke signals/etc).
unsigned char sreg;  // variable to save the processor status register in
sreg = SREG;   // save current processor status register

cli();     // disable interrupts in the status register

  // access variables here

SREG = sreg;  // restore original interrupt state ito the processor status 
register                                       
_______________________________________________
time-nuts mailing list -- [email protected]
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Reply via email to