Add transmission of ack/nack over USB
This commit is contained in:
parent
3e6b6d7428
commit
3a0efec0b9
|
@ -306,9 +306,18 @@ static int8_t CDC_Receive_FS (uint8_t* Buf, uint32_t *Len)
|
||||||
uint8_t n = *Len;
|
uint8_t n = *Len;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
if (Buf[i] == '\r') {
|
if (Buf[i] == '\r') {
|
||||||
slcan_parse_str(slcan_str, slcan_str_index);
|
int result = slcan_parse_str(slcan_str, slcan_str_index);
|
||||||
|
|
||||||
|
// Success
|
||||||
|
if(result == 0)
|
||||||
|
CDC_Transmit_FS("\n", 1);
|
||||||
|
// Failure
|
||||||
|
else
|
||||||
|
CDC_Transmit_FS("\a", 1);
|
||||||
|
|
||||||
slcan_str_index = 0;
|
slcan_str_index = 0;
|
||||||
} else {
|
} else {
|
||||||
slcan_str[slcan_str_index++] = Buf[i];
|
slcan_str[slcan_str_index++] = Buf[i];
|
||||||
|
|
Loading…
Reference in New Issue