libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
can.c File Reference
Include dependency graph for can.c:

Go to the source code of this file.

Functions

void can_enable (uint32_t canport)
 CAN Enable Enable the CAN peripheral and its associated FIFOs/counters/interrupts. More...
 
void can_disable (uint32_t canport)
 CAN Disable Disable the CAN peripheral and all associated FIFOs/counters/interrupts. More...
 
void can_init (uint32_t canport, bool listen_only, uint32_t sjw, uint32_t tseg1, uint32_t tseg2, bool sam3, uint32_t brp)
 CAN Init Initialize the selected CAN peripheral block. More...
 
void can_filter_clear (uint32_t canport)
 CAN Filter Clear Clear the message filters to receive all messages. More...
 
void can_filter_dual (uint32_t canport, uint32_t id1, uint32_t id1_mask, uint32_t id2, uint32_t id2_mask, uint8_t db, uint8_t db_mask)
 CAN Dual Filter Standard Frame Notes: More...
 
void can_filter_single_std (uint32_t canport, uint32_t id, uint32_t id_mask, uint8_t db1, uint8_t db1_mask, uint8_t db2, uint8_t db2_mask)
 CAN Filter Single Standard Frame Notes: More...
 
void can_filter_single_std_rtr (uint32_t canport, uint32_t id, uint32_t id_mask, uint8_t db1, uint8_t db1_mask, uint8_t db2, uint8_t db2_mask)
 CAN Filter Single Standard Frame w/RTR set Notes: More...
 
void can_filter_single_ext (uint32_t canport, uint32_t id, uint32_t id_mask)
 CAN Filter Single Extended Frame Notes: More...
 
void can_filter_single_ext_rtr (uint32_t canport, uint32_t id, uint32_t id_mask)
 CAN Filter Single Extended Frame w/RTR set Notes: More...
 
void can_enable_irq (uint32_t canport, uint8_t irq)
 CAN Enable IRQ. More...
 
void can_disable_irq (uint32_t canport, uint8_t irq)
 CAN Disable IRQ. More...
 
bool can_transmit_std (uint32_t canport, uint32_t id, bool rtr, uint8_t length, const uint8_t *data)
 CAN Transmit Standard Frame. More...
 
bool can_transmit_ext (uint32_t canport, uint32_t id, bool rtr, uint8_t length, const uint8_t *data)
 CAN Transmit Extended Frame. More...
 
void can_abort_transmit (uint32_t canport)
 CAN Abort Transmit Aborts the current transmission. More...
 
void can_receive (uint32_t canport, uint32_t *id, bool *ext, bool *rtr, uint8_t *length, uint8_t *data)
 CAN Receive Message If no data is in the RX buffer, id and length are set to 0. More...