diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-09-05 18:47:55 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-09-05 18:47:55 -0400 |
| commit | 0880d0b01a016177f047cc07a6a11d5e3639d095 (patch) | |
| tree | 602c68e273b977323863d6be100f5ee9880b3f34 /fw | |
| parent | ca008db4258598f14f6ec1891a4ab20c262ca924 (diff) | |
| download | can-gauge-interface-0880d0b01a016177f047cc07a6a11d5e3639d095.zip | |
usb: add nack to protocol
Diffstat (limited to 'fw')
| -rw-r--r-- | fw/usb.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -86,8 +86,10 @@ idleState(void) { case 'e': state.next = echoState; break; case 'w': state.next = writeEepromState; break; case 'r': state.next = readEepromState; break; - default: break; // invalid command + default: putsUSBUSART("nack\n"); break; // invalid command } + } else if (readLen > 0) { + putsUSBUSART("nack\n"); } return &state; |