SliceKit GPIO Example Applications
uart_tx_send_byte ( c_uartTX , buffer ); // Echoes back
>
the input characters if not in command mode
}
//:: Command
while ( COMMAND_MODE ) // Command mode activated
{
j =0;
skip =1;
while ( skip == 1)
{
//:: Send to process start
select
{
case uart_rx_get_byte_byref (
>
c_uartRX , rxState , buffer ):
cmd_rcvbuffer [j]= buffer ;
if( cmd_rcvbuffer [j ++] ==
>
'\r ')
{
skip =0;
j =0;
while (
>
cmd_rcvbuffer
>
[j] != '\r ')
{
c_process
>
<:
>
cmd_rcvbuffer
>
[j];
>
//
>
received
>
>
valid
>
>
command
>
and
>
>
send
>
the
>
>
command
>
to
>
the
>
process_data
>
>
theread
>
uart_tx_send_byte
>
(
>
c_uartTX
>
,
>
cmd_rcvbuffer
>
[j])
>
;
j ++;
}
cmd_rcvbuffer [j
>
]= '\0 ';
c_process <:
>
cmd_rcvbuffer
>
[j];
REV A