mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
f4 usb: ensure data buffers are 4-byte aligned
4-byte alignment is required for DMA.
This commit is contained in:
parent
9cc70695d7
commit
cb6f4a474e
@ -69,13 +69,13 @@ struct pios_usb_cdc_dev {
|
|||||||
bool usb_ctrl_if_enabled;
|
bool usb_ctrl_if_enabled;
|
||||||
bool usb_data_if_enabled;
|
bool usb_data_if_enabled;
|
||||||
|
|
||||||
uint8_t rx_packet_buffer[PIOS_USB_BOARD_CDC_DATA_LENGTH];
|
uint8_t rx_packet_buffer[PIOS_USB_BOARD_CDC_DATA_LENGTH] __attribute__ ((aligned(4)));
|
||||||
volatile bool rx_active;
|
volatile bool rx_active;
|
||||||
|
|
||||||
uint8_t tx_packet_buffer[PIOS_USB_BOARD_CDC_DATA_LENGTH];
|
uint8_t tx_packet_buffer[PIOS_USB_BOARD_CDC_DATA_LENGTH] __attribute__ ((aligned(4)));
|
||||||
volatile bool tx_active;
|
volatile bool tx_active;
|
||||||
|
|
||||||
uint8_t ctrl_tx_packet_buffer[PIOS_USB_BOARD_CDC_MGMT_LENGTH];
|
uint8_t ctrl_tx_packet_buffer[PIOS_USB_BOARD_CDC_MGMT_LENGTH] __attribute__ ((aligned(4)));
|
||||||
|
|
||||||
uint32_t rx_dropped;
|
uint32_t rx_dropped;
|
||||||
uint32_t rx_oversize;
|
uint32_t rx_oversize;
|
||||||
|
@ -67,10 +67,10 @@ struct pios_usb_hid_dev {
|
|||||||
|
|
||||||
bool usb_if_enabled;
|
bool usb_if_enabled;
|
||||||
|
|
||||||
uint8_t rx_packet_buffer[PIOS_USB_BOARD_HID_DATA_LENGTH];
|
uint8_t rx_packet_buffer[PIOS_USB_BOARD_HID_DATA_LENGTH] __attribute__ ((aligned(4)));
|
||||||
bool rx_active;
|
bool rx_active;
|
||||||
|
|
||||||
uint8_t tx_packet_buffer[PIOS_USB_BOARD_HID_DATA_LENGTH];
|
uint8_t tx_packet_buffer[PIOS_USB_BOARD_HID_DATA_LENGTH] __attribute__ ((aligned(4)));
|
||||||
bool tx_active;
|
bool tx_active;
|
||||||
|
|
||||||
uint32_t rx_dropped;
|
uint32_t rx_dropped;
|
||||||
|
Loading…
Reference in New Issue
Block a user