kopia lustrzana https://github.com/micropython/micropython
stm32/can: Guard header file by MICROPY_HW_ENABLE_CAN.
Because not all MCU series have a CAN peripheral.pull/4717/head
rodzic
ca8ff99e8c
commit
6b4666f8cf
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "py/obj.h"
|
||||
|
||||
#if MICROPY_HW_ENABLE_CAN
|
||||
|
||||
#define PYB_CAN_1 (1)
|
||||
#define PYB_CAN_2 (2)
|
||||
#define PYB_CAN_3 (3)
|
||||
|
@ -86,4 +88,6 @@ int can_receive(CAN_HandleTypeDef *can, int fifo, CanRxMsgTypeDef *msg, uint8_t
|
|||
HAL_StatusTypeDef CAN_Transmit(CAN_HandleTypeDef *hcan, uint32_t Timeout);
|
||||
void pyb_can_handle_callback(pyb_can_obj_t *self, uint fifo_id, mp_obj_t callback, mp_obj_t irq_reason);
|
||||
|
||||
#endif // MICROPY_HW_ENABLE_CAN
|
||||
|
||||
#endif // MICROPY_INCLUDED_STM32_CAN_H
|
||||
|
|
Ładowanie…
Reference in New Issue