各位坛友好,我今天晚上闲来无事,查看了一下g2553的头文件,发现了有好多细节的地方很不清楚,百度了一晚上也弄不出个所以然,所以希望在这里大家能帮助我解释一下这些疑问。问题如下:
在g2553的头文件中,
/* External references resolved by a device-specific linker command file */
#define SFR_8BIT(address) extern volatile unsigned char address
这个要怎么理解,结合下面的:
#ifndef __DisableCalData
SFR_8BIT(CALDCO_16MHZ); /* DCOCTL Calibration Data for 16MHz */
SFR_8BIT(CALBC1_16MHZ); /* BCSCTL1 Calibration Data for 16MHz */
SFR_8BIT(CALDCO_12MHZ); /* DCOCTL Calibration Data for 12MHz */
SFR_8BIT(CALBC1_12MHZ); /* BCSCTL1 Calibration Data for 12MHz */
SFR_8BIT(CALDCO_8MHZ); /* DCOCTL Calibration Data for 8MHz */
SFR_8BIT(CALBC1_8MHZ); /* BCSCTL1 Calibration Data for 8MHz */
SFR_8BIT(CALDCO_1MHZ); /* DCOCTL Calibration Data for 1MHz */
SFR_8BIT(CALBC1_1MHZ); /* BCSCTL1 Calibration Data for 1MHz */
#endif /* #ifndef __DisableCalData */
我是越看越不能理解,类似SFR_8BIT(CALDCO_16MHZ); /* DCOCTL Calibration Data for 16MHz */ 的代码有很多很多,主要是对
/* External references resolved by a device-specific linker command file */
#define SFR_8BIT(address) extern volatile unsigned char address
的不理解,其次#ifndef __DisableCalData和#endif /* #ifndef __DisableCalData */又是什么意思,请各位高人前辈帮忙,谢谢。
此帖出自
小平头技术问答
READ_ONLY DEFC( CALDCO_8MHZ, CALDCO_8MHZ_)
#define CALBC1_8MHZ_ (0x10FDu) /* BCSCTL1 Calibration Data for 8MHz */
READ_ONLY DEFC( CALBC1_8MHZ, CALBC1_8MHZ_)
#define CALDCO_12MHZ_ (0x10FAu) /* DCOCTL Calibration Data for 12MHz */
READ_ONLY DEFC( CALDCO_12MHZ, CALDCO_12MHZ_)
#define CALBC1_12MHZ_ (0x10FBu) /* BCSCTL1 Calibration Data for 12MHz */
READ_ONLY DEFC( CALBC1_12MHZ, CALBC1_12MHZ_)
#define CALDCO_16MHZ_ (0x10F8u) /* DCOCTL Calibration Data for 16MHz */
READ_ONLY DEFC( CALDCO_16MHZ, CALDCO_16MHZ_)
#define CALBC1_16MHZ_ (0x10F9u) /* BCSCTL1 Calibration Data for 16MHz */
READ_ONLY DEFC( CALBC1_16MHZ, CALBC1_16MHZ_)
TI的芯片在出厂时有一个校准好的1MHz时钟值,放在这个地方,
程序中直接调用就ok
一周热门 更多>