config.h
来自「ATMEL的can实验联系测试程序1,测试程序3」· C头文件 代码 · 共 61 行
H
61 行
#ifndef CONFIG_H
#define CONFIG_H
#include "REG51CC01.h"
#define CAN_PRESCALER_MIN 0
#define CAN_PRESCALER_MAX 63
#define MSK_CANBT2_SJW 0x60
#define MSK_CANBT2_PRS 0x0E
#define CAN_SJW_MIN 0
#define CAN_SJW_MAX 3
#define CAN_PRS_MIN 0
#define CAN_PRS_MAX 7
#define MSK_CANBT3_PHS2 0x70
#define MSK_CANBT3_PHS1 0x0E
#define CAN_PHS2_MIN 0
#define CAN_PHS2_MAX 7
#define CAN_PHS1_MIN 0
#define CAN_PHS1_MAX 7
#define MSK_CANBT2_SJW 0x60
#define MSK_CANBT2_PRS 0x0E
#define MSK_CANBT3_PHS2 0x70
#define MSK_CANBT3_PHS1 0x0E
#define MSK_CANCONCH_IDE 0x10
#define MSK_CANCONCH_CONF 0xC0
#define MSK_CANSTCH_Rx_OK 0x20
#define MSK_CANIDT4_RTRTAG 0x04
#define MSK_CANIDM4_RTRMSK 0x04
#define MSK_CANIDM4_IDEMSK 0x01
#define MSK_CANGIT_OVRTIM 0x20
#define MSK_CANGCON_ENA 0x02
#define MSK_CANGCON_GRES 0x01
#define CH_DISABLE 0x00
#define CH_RxENA 0x80
#define CH_TxENA 0x40
#define CH_RxBENA 0xC0
#endif /* TEMPLATE_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?