SSDA014 September 2026 MSPM0G5117 , MSPM0G5187
// ===== Queue Configuration =====
#define USB_TX_BUF_SIZE 8 // Max tasks in USB→I2C queue
#define I2C_TX_BUF_SIZE 8 // Max tasks in I2C→USB queue
// ===== USB/I2C Parameters =====
#define USB_FRAME_PACKAGE 64 // USB Full Speed max packet size (bytes)// Represents one 64-byte unit of data (one USB frame)
typedef struct {
uint8_t buffer[USB_FRAME_PACKAGE]; // Data payload (up to 64 bytes)
uint16_t length; // Actual data length in buffer
} TxElement_t;
// ===== FIFO Queue Structure =====
// Circular queue to manage multiple tasks
typedef struct {
uint16_t fifoIn; // Write pointer (next task to add)
uint16_t fifoOut; // Read pointer (next task to process)
uint16_t fifoCount; // Number of pending tasks in queue
TxElement_t *fifoPointer; // Pointer to task array
} TxFIFO_t;