29 lines
1.1 KiB
C
29 lines
1.1 KiB
C
|
#ifndef __STMFLASH_H
|
|||
|
#define __STMFLASH_H
|
|||
|
|
|||
|
#include "drv_sys.h"
|
|||
|
|
|||
|
/******************************************************************************************/
|
|||
|
/* CAN <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
|||
|
|
|||
|
#define CAN_RX_GPIO_PORT GPIOA
|
|||
|
#define CAN_RX_GPIO_PIN GPIO_PIN_11
|
|||
|
#define CAN_RX_GPIO_CLK_ENABLE() do{ __HAL_RCC_GPIOA_CLK_ENABLE(); }while(0) /* PA<50><41>ʱ<EFBFBD><CAB1>ʹ<EFBFBD><CAB9> */
|
|||
|
|
|||
|
#define CAN_TX_GPIO_PORT GPIOA
|
|||
|
#define CAN_TX_GPIO_PIN GPIO_PIN_12
|
|||
|
#define CAN_TX_GPIO_CLK_ENABLE() do{ __HAL_RCC_GPIOA_CLK_ENABLE(); }while(0) /* PA<50><41>ʱ<EFBFBD><CAB1>ʹ<EFBFBD><CAB9> */
|
|||
|
|
|||
|
/******************************************************************************************/
|
|||
|
|
|||
|
/* CAN<41><4E><EFBFBD><EFBFBD>RX0<58>ж<EFBFBD>ʹ<EFBFBD><CAB9> */
|
|||
|
#define CAN_RX0_INT_ENABLE 0 /* 0,<2C><>ʹ<EFBFBD><CAB9>; 1,ʹ<><CAB9>; */
|
|||
|
|
|||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ӿں<D3BF><DABA><EFBFBD> */
|
|||
|
uint8_t can_receive_msg(uint32_t id, uint8_t *buf); /* CAN<41><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>ѯ */
|
|||
|
uint8_t can_send_msg(uint32_t id, uint8_t *msg, uint8_t len); /* CAN<41><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
uint8_t can_init(uint32_t tsjw,uint32_t tbs2,uint32_t tbs1,uint16_t brp,uint32_t mode); /* CAN<41><4E>ʼ<EFBFBD><CABC> */
|
|||
|
|
|||
|
#endif
|
|||
|
|