| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef __CAN_BOARD_H__
- #define __CAN_BOARD_H__
- #define CAN_BOARD_NUM 1 // can板数量
- #define CHIP_ID_SIZE 4
- typedef struct
- {
- u8 type;
- char* name;
- }CAN_BOARD_NAME;
- struct can_board_res
- {
- u32 chip_id[CHIP_ID_SIZE]; // 子板标识
- u8 type;
- u8 given_slot; // 已下发卡槽号
- u8 slot; //板卡槽位地址
- u8 file_have; //
- u8 can_ch; //can总线通道
- s8 name[32];// 名字
- };
- extern struct can_board_res can_board[CAN_BOARD_NUM];
- extern u8 can_board_enable;
- extern void Hex2Str( const char *sSrc, char *sDest, int nSrcLen );
- int HexStr2Bytes(const char* pSrc, unsigned char* pDst, int nSrcLength);
- u32 reversebytes(u32 value);
- int equ_init_can_file_res(void);
- extern struct can_board_res* equ_get_can_slot(u8 give_slot, u8 type, u8* chip_id, u8 id_size);
- u8 is_can_slot_valid(u8 i);
- u8 get_can_slot(u8 i);
- void can_id_printf(void);
- char* get_can_name(u8 type);
- int get_can_type_from_slot(u8 slot);
- void can_brd_error_set(void);
- extern void can_brd_error_clear(u8 slot);
- #endif
|