So all this example should do is turn on the led when the button is pressed, but it doesn't...
Suggestions?
Yvo
Code: Select all
#include <platform.h>
#include <xs1.h>
out port led = PORT_BUTTON_LED_0;
in port button = PORT_BUTTON_A;
int main ()
{
int c;
while ( 1 )
{
button :> c;
if ( (c&15)==15 )
led <: 0;
else
led <: 1;
}
}