TI中文支持网
TI专业的中文技术问题搜集分享网站

这段定义是什么意思?

//###########################################################################
// FILE:   F28M35x_GlobalPrototypes.h
// TITLE:  Global prototypes for 28M35x Examples
//###########################################################################

/*—- shared global function prototypes ———————————–*/

// Analog Functions
#define AnalogClockEnable (unsigned short   (**)(unsigned short \
                                                 AnalogConfigReg, \
                                                 unsigned short \
                                                  AnalogClockMask))0x00240214
#define AnalogClockDisable (unsigned short   (**) (unsigned short \
                                                   AnalogConfigReg, \
                                                   unsigned short \
                                                   AnalogClockMask)) 0x00240216
#define ReadAnalogClockStatus (unsigned short (**) (unsigned short \
                                                    AnalogConfigReg)) \
    0x00240218
#define InitAnalogSystemClock (unsigned short (**) (unsigned short ClockDivider)) \
    0x0024021E
#define Device_Cal (void (**) (void)) 0x00240220

而地址段0x0024 0200 – 0x0024 03FF    :     TI OTP        1K

Jay:

你好。

这段代码定义了几个函数的入口地址。这几个函数是放在OTP上的,在芯片中已经固化,用户只需要调用即可。

谢谢。

//###########################################################################
// FILE:   F28M35x_GlobalPrototypes.h
// TITLE:  Global prototypes for 28M35x Examples
//###########################################################################

/*—- shared global function prototypes ———————————–*/

// Analog Functions
#define AnalogClockEnable (unsigned short   (**)(unsigned short \
                                                 AnalogConfigReg, \
                                                 unsigned short \
                                                  AnalogClockMask))0x00240214
#define AnalogClockDisable (unsigned short   (**) (unsigned short \
                                                   AnalogConfigReg, \
                                                   unsigned short \
                                                   AnalogClockMask)) 0x00240216
#define ReadAnalogClockStatus (unsigned short (**) (unsigned short \
                                                    AnalogConfigReg)) \
    0x00240218
#define InitAnalogSystemClock (unsigned short (**) (unsigned short ClockDivider)) \
    0x0024021E
#define Device_Cal (void (**) (void)) 0x00240220

而地址段0x0024 0200 – 0x0024 03FF    :     TI OTP        1K

kuntay:

回复 Jay:

那我想用汇编写还做不了了?

//###########################################################################
// FILE:   F28M35x_GlobalPrototypes.h
// TITLE:  Global prototypes for 28M35x Examples
//###########################################################################

/*—- shared global function prototypes ———————————–*/

// Analog Functions
#define AnalogClockEnable (unsigned short   (**)(unsigned short \
                                                 AnalogConfigReg, \
                                                 unsigned short \
                                                  AnalogClockMask))0x00240214
#define AnalogClockDisable (unsigned short   (**) (unsigned short \
                                                   AnalogConfigReg, \
                                                   unsigned short \
                                                   AnalogClockMask)) 0x00240216
#define ReadAnalogClockStatus (unsigned short (**) (unsigned short \
                                                    AnalogConfigReg)) \
    0x00240218
#define InitAnalogSystemClock (unsigned short (**) (unsigned short ClockDivider)) \
    0x0024021E
#define Device_Cal (void (**) (void)) 0x00240220

而地址段0x0024 0200 – 0x0024 03FF    :     TI OTP        1K

Jay:

回复 kuntay:

请问你想用汇编写什么功能?代码放在哪里?

//###########################################################################
// FILE:   F28M35x_GlobalPrototypes.h
// TITLE:  Global prototypes for 28M35x Examples
//###########################################################################

/*—- shared global function prototypes ———————————–*/

// Analog Functions
#define AnalogClockEnable (unsigned short   (**)(unsigned short \
                                                 AnalogConfigReg, \
                                                 unsigned short \
                                                  AnalogClockMask))0x00240214
#define AnalogClockDisable (unsigned short   (**) (unsigned short \
                                                   AnalogConfigReg, \
                                                   unsigned short \
                                                   AnalogClockMask)) 0x00240216
#define ReadAnalogClockStatus (unsigned short (**) (unsigned short \
                                                    AnalogConfigReg)) \
    0x00240218
#define InitAnalogSystemClock (unsigned short (**) (unsigned short ClockDivider)) \
    0x0024021E
#define Device_Cal (void (**) (void)) 0x00240220

而地址段0x0024 0200 – 0x0024 03FF    :     TI OTP        1K

kuntay:

回复 Jay:

自己用汇编写INITSYSCTRL

//###########################################################################
// FILE:   F28M35x_GlobalPrototypes.h
// TITLE:  Global prototypes for 28M35x Examples
//###########################################################################

/*—- shared global function prototypes ———————————–*/

// Analog Functions
#define AnalogClockEnable (unsigned short   (**)(unsigned short \
                                                 AnalogConfigReg, \
                                                 unsigned short \
                                                  AnalogClockMask))0x00240214
#define AnalogClockDisable (unsigned short   (**) (unsigned short \
                                                   AnalogConfigReg, \
                                                   unsigned short \
                                                   AnalogClockMask)) 0x00240216
#define ReadAnalogClockStatus (unsigned short (**) (unsigned short \
                                                    AnalogConfigReg)) \
    0x00240218
#define InitAnalogSystemClock (unsigned short (**) (unsigned short ClockDivider)) \
    0x0024021E
#define Device_Cal (void (**) (void)) 0x00240220

而地址段0x0024 0200 – 0x0024 03FF    :     TI OTP        1K

Jay:

回复 kuntay:

可以的。你写的代码放在其他地方就行。然后初始化的时候,不要调用OTP上的函数,调用你自己写的就行了。

//###########################################################################
// FILE:   F28M35x_GlobalPrototypes.h
// TITLE:  Global prototypes for 28M35x Examples
//###########################################################################

/*—- shared global function prototypes ———————————–*/

// Analog Functions
#define AnalogClockEnable (unsigned short   (**)(unsigned short \
                                                 AnalogConfigReg, \
                                                 unsigned short \
                                                  AnalogClockMask))0x00240214
#define AnalogClockDisable (unsigned short   (**) (unsigned short \
                                                   AnalogConfigReg, \
                                                   unsigned short \
                                                   AnalogClockMask)) 0x00240216
#define ReadAnalogClockStatus (unsigned short (**) (unsigned short \
                                                    AnalogConfigReg)) \
    0x00240218
#define InitAnalogSystemClock (unsigned short (**) (unsigned short ClockDivider)) \
    0x0024021E
#define Device_Cal (void (**) (void)) 0x00240220

而地址段0x0024 0200 – 0x0024 03FF    :     TI OTP        1K

kuntay:

回复 Jay:

关键是这段我不懂怎么配置啊,我自己配置的ADC不成功,但是调用例程中的initsysctrl();能行。

赞(0)
未经允许不得转载:TI中文支持网 » 这段定义是什么意思?
分享到: 更多 (0)