I bought XS1-L2-USB-AUDIO-2.0-MC board so first i want to test on it.
I installed firmware usb.xe it is ok but i want to test LED-s like illuminating in order as i wanted.
so i typed small code i built it on compiler but did not flash into the device
give me some advice please.
Code: Select all
#include <platform.h>
#define FLASH_PERIOD 20000000
out port x0ledB = XS1_PORT_8B;
int main(void) {
timer tmr;
unsigned ledOn = 1;
unsigned t;
tmr :> t;
while (1) {
x0ledB <: ledOn;
t += FLASH_PERIOD;
tmr when timerafter(t) :> void;
ledOn = !ledOn;
}
return 0;
}