Fix race condition on multiple interfaces receiving at once

This commit is contained in:
jacob.eva 2024-09-04 17:37:09 +01:00
parent 6035e1a2c2
commit 81aff16c2d
No known key found for this signature in database
GPG key ID: 0B92E083BBCCAA1E
4 changed files with 36 additions and 41 deletions

View file

@ -28,6 +28,8 @@
#define CABLE_STATE_DISCONNECTED 0x00
#define CABLE_STATE_CONNECTED 0x01
uint8_t cable_state = CABLE_STATE_DISCONNECTED;
#define MAX_INTERFACES 12
#define BT_STATE_NA 0xff
#define BT_STATE_OFF 0x00
@ -88,6 +90,11 @@
uint8_t seq = 0xFF;
uint16_t read_len = 0;
FIFOBuffer packet_rdy_interfaces;
uint8_t packet_rdy_interfaces_buf[MAX_INTERFACES];
// Incoming packet buffer
uint8_t pbuf[MTU];