autowp / arduino-mcp2515

Arduino MCP2515 CAN interface library
MIT License
793 stars 279 forks source link

Correct interrupt example: Varbiable accessed by ISR needs to be volatile #50

Closed meganukebmp closed 3 years ago

meganukebmp commented 3 years ago

Global variables accessed by an ISR need to be volatile to avoid them being optimized away.