Reference design code modification for blinking LEDs?

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
rlim
Member++
Posts: 16
Joined: Wed May 12, 2010 10:00 pm

Reference design code modification for blinking LEDs?

Post by rlim »

Hello. I have been playing around with the L1 reference board for a while, and am now trying to get one of the LEDs to toggle whenever there is a packet size change indicating to the host to speed up or slow down.

I know this sounds simple enough, but when looking at the xc code, it's a frightening affair for someone new to xc and usb protocol. Can someone point me to where I can insert LED code? I am looking at 'handle_audio_request' where there's a reference to 'c_led', and within this function, there are empty conditional if statements referencing 'DEBUG_LEDS'. Can someone elaborate with example code of how one can use these, and if it's related to my request above.

Thanks in advance,
Richard
User avatar
Ross
Verified
XCore Legend
Posts: 1163
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Hi there, did you get this going?

My first reaction is that this will happen so often that you will not see the output properly on a LED..