Hey guys, I'm going through the workshop PDF provided on the Stellaris website, and at the end of one lab it suggests to look at how the buttons on the board work and play around with them. After taking a while to get things to link properly, I finally managed to get everything going and there aren't many problems. I'm using the buttons.c and buttons.h files that came with the demo project, but the issue is that only one button seems to be working. If I make a conditional statement for when the button is pressed, it will work perfectly if I use LEFT_BUTTON to trigger it, but it doesn't respond at all if I use RIGHT_BUTTON. I didn't define these anywhere myself, and looking in buttons.h, they both seem to be defined the same way, so I don't see why one would work and one wouldn't. Both buttons work for the sample program, so I can't imagine it's a hardware thing (either the button being broken or the header pointing to the wrong address) so I'm not sure what it could be.
If my explanation isn't enough, here's a really simple example. Let's say I'm blinking an LED and I want the blinking to slow down when I press the button.
if (BUTTON_PRESSED(LEFT_BUTTON, ucState, ucDelta)) {
lag = lag + 10;
}
Using this, the blinking slows down if I press the left button. But if I replace that with what's below, nothing happens.
if (BUTTON_PRESSED(RIGHT_BUTTON, ucState, ucDelta)) {
lag = lag + 10;
}
I'm using ButtonsPoll to get the button state, but as far as I know it treats the buttons pretty much the same so I don't think it's possible for that to be causing the problems, but I don't really know.
I'm really new to this stuff so the answer is probably something really obvious that I'm overlooking, but I haven't really had any luck yet and was hoping somebody could help me out. Thanks a bunch.