File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 18
18
#define CDC_ITF 0 // USB CDC interface no
19
19
20
20
#define SPI_IF spi0 // Which PL022 to use
21
- #define SPI_BAUD 4000000 // Default baudrate (4 MHz - SPI defaultt d )
21
+ #define SPI_BAUD 4000000 // Default baudrate (4 MHz - SPI default )
22
22
#define SPI_CS 5
23
23
#define SPI_MISO 4
24
24
#define SPI_MOSI 3
@@ -196,6 +196,8 @@ static void command_loop(void)
196
196
uint32_t slen , rlen ;
197
197
readbytes_blocking (& slen , 3 ); // Read send length
198
198
readbytes_blocking (& rlen , 3 ); // Read receive length
199
+ slen &= 0x00FFFFFF ; // Mask to zero out the upper 8 bits
200
+ rlen &= 0x00FFFFFF ; // Mask to zero out the upper 8 bitsgi
199
201
200
202
uint8_t tx_buffer [MAX_BUFFER_SIZE ]; // Buffer for transmit data
201
203
uint8_t rx_buffer [MAX_BUFFER_SIZE ]; // Buffer for receive data
You can’t perform that action at this time.
0 commit comments