Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions opendisplay_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,17 @@ static void dispatch(uint8_t connection, uint16_t cmd, const uint8_t *payload, u
case CMD_DIRECT_WRITE_END:
handle_direct_write_end(connection, payload, payload_len);
break;
case CMD_DIRECT_WRITE_PARTIAL_START:
case CMD_BUZZER_ACTIVATE: {
/* Not implemented on Silabs, but the client sends these and blocks
* waiting for a reply. Emit a NACK so it fails fast instead of timing
* out: {0xFF, cmd_low, err, 0x00} matches the client's parse_nack()
* (0x76 falls back to a full upload; 0x77 raises promptly). Error code
* 0x07 = "unsupported" (ERR_PARTIAL_UNSUPPORTED on the client). */
uint8_t nack[] = { 0xFFu, (uint8_t)(cmd & 0xFFu), 0x07u, 0x00u };
pipe_send(connection, nack, sizeof(nack));
break;
}
default:
printf("[OD] unknown cmd 0x%04X\r\n", (unsigned)cmd);
break;
Expand Down
3 changes: 3 additions & 0 deletions opendisplay_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#define CMD_DIRECT_WRITE_END 0x0072u
#define CMD_LED_ACTIVATE 0x0073u
#define CMD_LED_STOP 0x0075u
/* Client-visible but unimplemented on Silabs; dispatch NACKs them (see dispatch()) */
#define CMD_DIRECT_WRITE_PARTIAL_START 0x0076u
#define CMD_BUZZER_ACTIVATE 0x0077u
/* NFC: sub byte0 0=read, 1=write (+rec_type,len16,payload), 0x10/0x11/0x12=chunked write; rec_type OD_NFC_REC_* */
#define CMD_NFC_ENDPOINT 0x0082u
#define CMD_REBOOT 0x000Fu
Expand Down