Skip to content

Commit 6050351

Browse files
committed
implement more commands
1 parent 5412558 commit 6050351

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

main.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@ static void command_loop(void)
137137
sendbyte_blocking(0x01);
138138
sendbyte_blocking(0x00);
139139
break;
140+
case S_CMD_Q_RDNMAXLEN:
141+
case S_CMD_Q_WRNMAXLEN:
142+
{
143+
sendbyte_blocking(S_ACK);
144+
145+
// Break down MAX_BUFFER_SIZE into three bytes (24 bits) in little-endian format
146+
sendbyte_blocking(MAX_BUFFER_SIZE & 0xFF); // LSB
147+
sendbyte_blocking((MAX_BUFFER_SIZE >> 8) & 0xFF); // Middle byte
148+
sendbyte_blocking((MAX_BUFFER_SIZE >> 16) & 0xFF); // MSB
149+
150+
break;
151+
}
140152
case S_CMD_Q_CMDMAP:
141153
{
142154
static const uint32_t cmdmap[8] = {

0 commit comments

Comments
 (0)