#ifndef __BSP_CAN_h
#define __BSP_CAN_h

#include "at32a423.h"
#define DEV_CAN1_ID          (0x300)

typedef enum
{
	CAN_DISABLE,
	CAN_ONCE_TIGGER,
	CAN_CONTINUE
}Enum_can_mode;

extern volatile Enum_can_mode can1_receive_fifo0_flag;

void can1_init(void);
void send_can1_data(uint32_t id, uint8_t *msg, uint8_t msg_len);
void send_can1_buffer(uint32_t id, uint8_t *buffer, uint16_t buffer_len);
/* can transmit data */
void can1_transmit_data(uint32_t id);
void copyToBytes(uint8_t externalArray[12][12]);
void can1_transmit_data_pressure(uint32_t id,uint8_t pressure[8]);

void can_transmit_all_id(void);
#endif

