atsamd: Fixes for samc21 and compiler optimizations (#6198)

Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
This commit is contained in:
Luke V
2023-06-16 16:41:08 -04:00
committed by GitHub
parent 5ee72d320c
commit 9cb2656914
2 changed files with 26 additions and 4 deletions

View File

@@ -119,7 +119,8 @@ canhw_send(struct canbus_msg *msg)
txfifo->dlc_section = (msg->dlc & 0x0f) << 16;
txfifo->data[0] = msg->data32[0];
txfifo->data[1] = msg->data32[1];
barrier();
__DMB();
CANx->TXBAR.reg;
CANx->TXBAR.reg = ((uint32_t)1 << w_index);
return CANMSG_DATA_LEN(msg);
}