|
Re: Global Struct Arrays and Interrupts
The tick variable is an integer, with multiple bytes. It's conceivable that an interrupt could occur after one byte was read but before the other one, so you'd get a corrupted value. Any time you want to use a variable like that, it's a good idea to disable interrupts while you access it.
|