[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] buggy variable naming with underscores
From: |
Jamie Morken |
Subject: |
[avr-gcc-list] buggy variable naming with underscores |
Date: |
Mon, 14 Mar 2005 01:55:20 -0800 |
Hi,
Not sure if this is a bug, but I finally figured out why my motor wasn't
changing direction, and it is because the name of it had an underscore in it:
"volatile u08 motor_direction;"
So I changed it to this name:
"volatile u08 motorDirection;"
and it works now. I check this variable in the interrupt:
"SIGNAL(SIG_OVERFLOW1)"
like this:
"if (motorDirection == 1)"
I have noticed other intermittent/hard to reproduce bugs with variables with
underscores in their names in winavr. I tried earlier to make a simple program
showing the bug clearly, but the bug disappeared :)
I think it may only be when you try to access these variables from an ISR..
cheers,
Jamie
- [avr-gcc-list] buggy variable naming with underscores,
Jamie Morken <=