Skip to content

Commit db8dd86

Browse files
committed
remove duplicated case
1 parent e58d468 commit db8dd86

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

main.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -296,27 +296,6 @@ static void command_loop(void)
296296
sendbyte_blocking(S_ACK);
297297
break;
298298
}
299-
case S_CMD_O_WRITEB:
300-
{
301-
if (opbuf_pos + 5 > MAX_OPBUF_SIZE) {
302-
sendbyte_blocking(S_NAK);
303-
break;
304-
}
305-
306-
uint32_t addr;
307-
uint8_t byte;
308-
readbytes_blocking(&addr, 3);
309-
byte = readbyte_blocking();
310-
311-
// Store in operation buffer (assuming format: 1-byte command, 3-byte address, 1-byte data)
312-
opbuf[opbuf_pos++] = S_CMD_O_WRITEB;
313-
memcpy(&opbuf[opbuf_pos], &addr, 3);
314-
opbuf_pos += 3;
315-
opbuf[opbuf_pos++] = byte;
316-
317-
sendbyte_blocking(S_ACK);
318-
break;
319-
}
320299
case S_CMD_O_INIT:
321300
{
322301
opbuf_pos = 0; // Reset the operation buffer position

0 commit comments

Comments
 (0)