mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-12 19:10:32 +03:00
Simplify cliWriter structure definition as use of uint8_t data[] (flexible array member) at the end of the bufWriter_t structure is breaking the F411 build
This commit is contained in:
parent
a3a3b74fd5
commit
aa833b2b2f
6 changed files with 13 additions and 17 deletions
|
@ -186,7 +186,7 @@ __ALIGN_BEGIN uint8_t CmdBuff[CDC_CMD_PACKET_SZE] __ALIGN_END ;
|
|||
|
||||
volatile uint32_t APP_Rx_ptr_in = 0;
|
||||
volatile uint32_t APP_Rx_ptr_out = 0;
|
||||
volatile uint32_t APP_Rx_length = 0;
|
||||
uint32_t APP_Rx_length = 0;
|
||||
|
||||
uint8_t USB_Tx_State = USB_CDC_IDLE;
|
||||
|
||||
|
@ -641,7 +641,7 @@ uint8_t usbd_cdc_DataIn (void *pdev, uint8_t epnum)
|
|||
DCD_EP_Tx(pdev, CDC_IN_EP, (uint8_t*)&APP_Rx_Buffer[APP_Rx_ptr_out], USB_Tx_length);
|
||||
|
||||
// Advance the out pointer
|
||||
APP_Rx_ptr_out = (APP_Rx_ptr_out + USB_Tx_length) % APP_RX_DATA_SIZE;;
|
||||
APP_Rx_ptr_out = (APP_Rx_ptr_out + USB_Tx_length) % APP_RX_DATA_SIZE;
|
||||
APP_Rx_length -= USB_Tx_length;
|
||||
|
||||
return USBD_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue