STM32F10x library
can.h
1 #ifndef MAT_CAN_H
2 #define MAT_CAN_H
3 
4 // valid for HSE_VALUE 8 MHz
5 #define CAN_BR_1000 6
6 #define CAN_BR_500 12
7 #define CAN_BR_250 24
8 #define CAN_BR_125 48
9 #define CAN_BR_100 60
10 #define CAN_BR_50 120
11 #define CAN_BR_20 300
12 #define CAN_BR_10 600
13 
14 void can_init(uint16_t br, uint8_t md);
15 void can_shutdown(void);
16 uint8_t can_filter(uint32_t id, uint32_t msk);
17 uint8_t can_tx(CanTxMsg* msg);
18 uint8_t can_rx(CanRxMsg* msg);
19 
20 #endif
void can_shutdown(void)
Deinit CAN.
Definition: can.c:124
void can_init(uint16_t br, uint8_t md)
Init CAN.
Definition: can.c:61
uint8_t can_rx(CanRxMsg *msg)
Receive CAN message.
Definition: can.c:152
uint8_t can_tx(CanTxMsg *msg)
Transmit CAN message.
Definition: can.c:134
uint8_t can_filter(uint32_t id, uint32_t msk)
Add a filter to CAN reception logic. ID bits masked with 1 have to match.
Definition: can.c:36