Skip to content

Commit b1fec1a

Browse files
committed
[UART] Reorder serial_t field to avoid padding
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 0c2dd3b commit b1fec1a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cores/arduino/stm32/uart.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,20 @@ typedef struct serial_s serial_t;
5555
struct serial_s {
5656
USART_TypeDef *uart;
5757
UART_HandleTypeDef handle;
58-
uint8_t index;
59-
uint8_t recv;
6058
uint32_t baudrate;
6159
uint32_t databits;
6260
uint32_t stopbits;
6361
uint32_t parity;
6462
PinName pin_tx;
6563
PinName pin_rx;
6664
IRQn_Type irq;
65+
uint8_t index;
66+
uint8_t recv;
6767
uint8_t *rx_buff;
68-
volatile uint16_t rx_head;
69-
uint16_t rx_tail;
7068
uint8_t *tx_buff;
69+
uint16_t rx_tail;
7170
uint16_t tx_head;
71+
volatile uint16_t rx_head;
7272
volatile uint16_t tx_tail;
7373
};
7474

0 commit comments

Comments
 (0)