Skip to content

Commit

Permalink
Compilation fixes (CAN bus)
Browse files Browse the repository at this point in the history
  • Loading branch information
podhrmic committed Nov 7, 2017
1 parent f5df26d commit dcb1f62
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions sw/airborne/arch/stm32/mcu_periph/can_arch.c
Expand Up @@ -196,9 +196,11 @@ int can_hw_transmit(uint32_t id, const uint8_t *buf, uint8_t len)
#ifdef STM32F1
void usb_lp_can_rx0_isr(void)
{
uint32_t id, fmi;
uint32_t id;
uint8_t fmi;
bool ext, rtr;
uint8_t length, data[8];
uint16_t timestamp;

can_receive(CAN1,
0, /* FIFO: 0 */
Expand All @@ -208,17 +210,20 @@ void usb_lp_can_rx0_isr(void)
&rtr,
&fmi,
&length,
data);
data,
&timestamp);

_can_run_rx_callback(id, data, length);

can_fifo_release(CAN1, 0);
}
#elif STM32F4
void can1_rx0_isr(void){
uint32_t id, fmi;
uint32_t id;
uint8_t fmi;
bool ext, rtr;
uint8_t length, data[8];
uint16_t timestamp;

can_receive(CAN1,
0, /* FIFO: 0 */
Expand All @@ -228,7 +233,8 @@ void can1_rx0_isr(void){
&rtr,
&fmi,
&length,
data);
data,
&timestamp);

_can_run_rx_callback(id, data, length);

Expand Down

0 comments on commit dcb1f62

Please sign in to comment.