/* Endless loop until ESC key is pressed */
recv_buf[0] = '\n';
//while (recv_buf[0] != ESCKEY) {
while (recv_buf[0] != ESCKEY) {
/* Echo it back */
LPC_UARTD_API->uart_put_char(uartHandle, recv_buf[0]);
/* uart_get_char will block until a character is received */
recv_buf[0] = LPC_UARTD_API->uart_get_char(uartHandle);
switch (recv_buf[0])
{
case '0':
Board_LED_Set(0, false);
Board_LED_Set(1, false);
break;
case '1':
Board_LED_Set(0, true);
Board_LED_Set(1, false);
break;
case '2':
Board_LED_Set(0, false);
Board_LED_Set(1, true);
break;
|