📄 rom.h
字号:
//
// Macros for calling ROM functions in the GPIO API.
//
//*****************************************************************************
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinWrite \
((void (*)(unsigned long ulPort, \
unsigned char ucPins, \
unsigned char ucVal))ROM_GPIOTABLE[0])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIODirModeSet \
((void (*)(unsigned long ulPort, \
unsigned char ucPins, \
unsigned long ulPinIO))ROM_GPIOTABLE[1])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIODirModeGet \
((unsigned long (*)(unsigned long ulPort, \
unsigned char ucPin))ROM_GPIOTABLE[2])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOIntTypeSet \
((void (*)(unsigned long ulPort, \
unsigned char ucPins, \
unsigned long ulIntType))ROM_GPIOTABLE[3])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOIntTypeGet \
((unsigned long (*)(unsigned long ulPort, \
unsigned char ucPin))ROM_GPIOTABLE[4])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPadConfigSet \
((void (*)(unsigned long ulPort, \
unsigned char ucPins, \
unsigned long ulStrength, \
unsigned long ulPadType))ROM_GPIOTABLE[5])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPadConfigGet \
((void (*)(unsigned long ulPort, \
unsigned char ucPin, \
unsigned long *pulStrength, \
unsigned long *pulPadType))ROM_GPIOTABLE[6])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinIntEnable \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[7])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinIntDisable \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[8])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinIntStatus \
((long (*)(unsigned long ulPort, \
tBoolean bMasked))ROM_GPIOTABLE[9])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinIntClear \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[10])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinRead \
((long (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[11])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypeCAN \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[12])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypeComparator \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[13])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypeGPIOInput \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[14])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypeGPIOOutput \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[15])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypeI2C \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[16])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypePWM \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[17])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypeQEI \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[18])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypeSSI \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[19])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypeTimer \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[20])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypeUART \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[21])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_GPIOPinTypeGPIOOutputOD \
((void (*)(unsigned long ulPort, \
unsigned char ucPins))ROM_GPIOTABLE[22])
#endif
//*****************************************************************************
//
// Macros for calling ROM functions in the I2C API.
//
//*****************************************************************************
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterDataPut \
((void (*)(unsigned long ulBase, \
unsigned char ucData))ROM_I2CTABLE[0])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterInitExpClk \
((void (*)(unsigned long ulBase, \
unsigned long ulI2CClk, \
tBoolean bFast))ROM_I2CTABLE[1])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CSlaveInit \
((void (*)(unsigned long ulBase, \
unsigned char ucSlaveAddr))ROM_I2CTABLE[2])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterEnable \
((void (*)(unsigned long ulBase))ROM_I2CTABLE[3])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CSlaveEnable \
((void (*)(unsigned long ulBase))ROM_I2CTABLE[4])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterDisable \
((void (*)(unsigned long ulBase))ROM_I2CTABLE[5])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CSlaveDisable \
((void (*)(unsigned long ulBase))ROM_I2CTABLE[6])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterIntEnable \
((void (*)(unsigned long ulBase))ROM_I2CTABLE[7])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CSlaveIntEnable \
((void (*)(unsigned long ulBase))ROM_I2CTABLE[8])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterIntDisable \
((void (*)(unsigned long ulBase))ROM_I2CTABLE[9])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CSlaveIntDisable \
((void (*)(unsigned long ulBase))ROM_I2CTABLE[10])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterIntStatus \
((tBoolean (*)(unsigned long ulBase, \
tBoolean bMasked))ROM_I2CTABLE[11])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CSlaveIntStatus \
((tBoolean (*)(unsigned long ulBase, \
tBoolean bMasked))ROM_I2CTABLE[12])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterIntClear \
((void (*)(unsigned long ulBase))ROM_I2CTABLE[13])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CSlaveIntClear \
((void (*)(unsigned long ulBase))ROM_I2CTABLE[14])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterSlaveAddrSet \
((void (*)(unsigned long ulBase, \
unsigned char ucSlaveAddr, \
tBoolean bReceive))ROM_I2CTABLE[15])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterBusy \
((tBoolean (*)(unsigned long ulBase))ROM_I2CTABLE[16])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterBusBusy \
((tBoolean (*)(unsigned long ulBase))ROM_I2CTABLE[17])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterControl \
((void (*)(unsigned long ulBase, \
unsigned long ulCmd))ROM_I2CTABLE[18])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterErr \
((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[19])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CMasterDataGet \
((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[20])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CSlaveStatus \
((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[21])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CSlaveDataPut \
((void (*)(unsigned long ulBase, \
unsigned char ucData))ROM_I2CTABLE[22])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_I2CSlaveDataGet \
((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[23])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_UpdateI2C \
((void (*)(void))ROM_I2CTABLE[24])
#endif
//*****************************************************************************
//
// Macros for calling ROM functions in the Interrupt API.
//
//*****************************************************************************
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_IntEnable \
((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[0])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -