⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apphardwareapi.h

📁 此程式庫有許多的zigbee程式源碼
💻 H
📖 第 1 页 / 共 2 页
字号:
typedef void   (*tprvAHI_WakeTimerEnable)(uint8, bool_t);typedef void   (*tprvAHI_WakeTimerStart)(uint8, uint32);typedef void   (*tprvAHI_WakeTimerStop)(uint8);typedef uint8  (*tpru8AHI_WakeTimerStatus)(void);typedef uint32 (*tpru32AHI_WakeTimerCalibrate)(void);typedef uint8  (*tpru8AHI_WakeTimerFiredStatus)(void);/* GPIO */typedef void   (*tprvAHI_DioSetDirection)(uint32, uint32);typedef void   (*tprvAHI_DioSetOutput)(uint32, uint32);typedef void   (*tprvAHI_DioSetPullup)(uint32 u32On, uint32 u32Off);typedef uint32 (*tpru32AHI_DioReadInput)(void);typedef void   (*tprvAHI_DioWakeEdge)(uint32 u32Rising, uint32 u32Falling);typedef void   (*tprvAHI_DioWakeEnable)(uint32 u32Enable, uint32 u32Disable);typedef uint32 (*tpru32AHI_DioWakeStatus)(void);/* UARTs */typedef void   (*tprvAHI_UartEnable)(uint8);typedef void   (*tprvAHI_UartDisable)(uint8);typedef void   (*tprvAHI_UartSetClockDivisor)(uint8, uint8);typedef void   (*tprvAHI_UartSetControl)(uint8, bool_t, bool_t, uint8, bool_t, bool_t);typedef void   (*tprvAHI_UartSetInterrupt)(uint8, bool_t, bool_t, bool_t, bool_t, uint8);typedef void   (*tprvAHI_UartReset)(uint8, bool_t, bool_t);typedef uint8  (*tpru8AHI_UartReadLineStatus)(uint8);typedef uint8  (*tpru8AHI_UartReadModemStatus)(uint8);typedef uint8  (*tpru8AHI_UartReadInterruptStatus)(uint8);typedef void   (*tprvAHI_UartWriteData)(uint8, uint8);typedef uint8  (*tpru8AHI_UartReadData)(uint8);typedef void   (*tprvAHI_Uart0RegisterCallback)(PR_HWINT_APPCALLBACK);typedef void   (*tprvAHI_Uart1RegisterCallback)(PR_HWINT_APPCALLBACK);/* Timers */typedef void   (*tprvAHI_TimerEnable)(uint8, uint8, bool_t, bool_t);typedef void   (*tprvAHI_TimerDisable)(uint8 );typedef void   (*tprvAHI_TimerClockSelect)(uint8, bool_t, bool_t);typedef void   (*tprvAHI_TimerStartSingleShot)(uint8, uint16, uint16);typedef void   (*tprvAHI_TimerStartRepeat)(uint8, uint16, uint16);typedef void   (*tprvAHI_TimerStartDeltaSigma)(uint8, uint16, uint16, bool_t);typedef void   (*tprvAHI_TimerStartCapture)(uint8);typedef void   (*tprvAHI_TimerReadCapture)(uint8, uint16 *, uint16 *);typedef void   (*tprvAHI_TimerStop)(uint8);typedef bool_t (*tprbAHI_TimerFired)(uint8);typedef void   (*tprvAHI_Timer0RegisterCallback)(PR_HWINT_APPCALLBACK);typedef void   (*tprvAHI_Timer1RegisterCallback)(PR_HWINT_APPCALLBACK);/* Tick Timers */typedef uint32 (*tpru32AHI_TickTimerRead)(void);typedef void   (*tprvAHI_TickTimerIntPendClr)(void);typedef bool_t (*tprbAHI_TickTimerIntStatus)(void);typedef void   (*tprvAHI_TickTimerWrite)(uint32);typedef void   (*tprvAHI_TickTimerConfigure)(uint8);typedef void   (*tprvAHI_TickTimerInterval)(uint32);typedef void   (*tprvAHI_TickTimerIntEnable)(bool_t);typedef void   (*tprvAHI_TickTimerInit)(PR_HWINT_APPCALLBACK);/* SPI master */typedef void   (*tprvAHI_SpiConfigure)(uint8, bool_t, bool_t, bool_t, uint8, bool_t, bool_t);typedef void   (*tprvAHI_SpiReadConfiguration)(tSpiConfiguration *);typedef void   (*tprvAHI_SpiRestoreConfiguration)(tSpiConfiguration *);typedef void   (*tprvAHI_SpiSelect)(uint8);typedef void   (*tprvAHI_SpiStop)(void);typedef void   (*tprvAHI_SpiStartTransfer32)(uint32);typedef uint32 (*tpru32AHI_SpiReadTransfer32)(void);typedef void   (*tprvAHI_SpiStartTransfer16)(uint16 u16Out);typedef uint16 (*tpru16AHI_SpiReadTransfer16)(void);typedef void   (*tprvAHI_SpiStartTransfer8)(uint8);typedef uint8  (*tpru8AHI_SpiReadTransfer8)(void);typedef bool_t (*tprbAHI_SpiPollBusy)(void);typedef void   (*tprvAHI_SpiWaitBusy)(void);typedef void   (*tprvAHI_SpiRegisterCallback)(PR_HWINT_APPCALLBACK);/* Serial 2-wire interface */typedef void   (*tprvAHI_SiConfigure)(bool_t, bool_t, uint16);typedef void   (*tprvAHI_SiSetCmdReg)(bool_t, bool_t, bool_t, bool_t, bool_t, bool_t);typedef void   (*tprvAHI_SiWriteData8)(uint8);typedef void   (*tprvAHI_SiWriteSlaveAddr)(uint8, bool_t);typedef uint8  (*tpru8AHI_SiReadData8)(void);typedef bool_t (*tprbAHI_SiPollBusy)(void);typedef bool_t (*tprbAHI_SiPollTransferInProgress)(void);typedef bool_t (*tprbAHI_SiPollRxNack)(void);typedef bool_t (*tprbAHI_SiPollArbitrationLost)(void);typedef void   (*tprvAHI_SiRegisterCallback)(PR_HWINT_APPCALLBACK);/* NVRAM */typedef uint8  (*tpru8AHI_NvRamBase)(void);typedef void   (*tprvAHI_NvRamWrite)(uint8, uint32);typedef uint32 (*tpru32AHI_NvRamRead)(uint8);/* Flash access */typedef bool_t (*tprbAHI_FlashErase)(void);typedef bool_t (*tprbAHI_FlashProgram)(uint16, uint16, uint8 *);typedef bool_t (*tprbAHI_FlashRead)(uint16, uint16, uint8 *);/****************************************************************************//*** ROM Function Pointer Casts                                           ***//***                                                                      ***//*** These map function calls into accesses into memory locations in the  ***//*** ROM area.                                                            ***//****************************************************************************//* Initialisation */#define u32AHI_Init                  ((tpru32AHI_InitRom)                 0x2f8c)/* System controller */#define u8AHI_PowerStatus            ((tpru8AHI_PowerStatus)              0x37dc)#define vAHI_ProtocolPower           ((tprvAHI_ProtocolPower)             0x3844)#define vAHI_MemoryHold              ((tprvAHI_MemoryHold)                0x3804)#define vAHI_CpuDoze                 ((tprvAHI_CpuDoze)                   0x3884)#define vAHI_PowerDown               ((tprvAHI_PowerDown)                 0x38ac)#define vAHI_SysCtrlRegisterCallback ((tprvAHI_SysCtrlRegisterCallback)   0x3984)/* ADC/DAC */#define vAHI_ApConfigure              ((tprvAHI_ApConfigure)              0x20a8)#define bAHI_APRegulatorEnabled       ((tprbAHI_APRegulatorEnabled)       0x2198)#define vAHI_APRegisterCallback       ((tprvAHI_APRegisterCallback)       0x2570)#define vAHI_AdcEnable                ((tprvAHI_AdcEnable)                0x21c4)#define vAHI_AdcDisable               ((tprvAHI_AdcDisable)               0x228c)#define vAHI_AdcStartSample           ((tprvAHI_AdcStartSample)           0x22bc)#define bAHI_AdcPoll                  ((tprbAHI_AdcPoll)                  0x22e4)#define u16AHI_AdcRead                ((tpru16AHI_AdcRead)                0x230c)#define vAHI_DacEnable                ((tprvAHI_DacEnable)                0x2334)#define bAHI_DacPoll                  ((tprbAHI_DacPoll)                  0x2420)#define vAHI_DacOutput                ((tprvAHI_DacOutput)                0x246c)#define vAHI_DacDisable               ((tprvAHI_DacDisable)               0x24c4)/* Comparators */#define vAHI_ComparatorEnable         ((tprvAHI_ComparatorEnable)         0x25a8)#define vAHI_ComparatorDisable        ((tprvAHI_ComparatorDisable)        0x2634)#define vAHI_ComparatorIntEnable      ((tprvAHI_ComparatorIntEnable)      0x2678)#define vAHI_ComparatorWakeEnable     ((tprvAHI_ComparatorWakeEnable)     0x2714)#define u8AHI_ComparatorStatus        ((tpru8AHI_ComparatorStatus)        0x2744)#define u8AHI_ComparatorWakeStatus    ((tpru8AHI_ComparatorWakeStatus)    0x2770)/* Wake timers */#define vAHI_WakeTimerEnable          ((tprvAHI_WakeTimerEnable)          0x40f8)#define vAHI_WakeTimerStart           ((tprvAHI_WakeTimerStart)           0x41c4)#define vAHI_WakeTimerStop            ((tprvAHI_WakeTimerStop)            0x4274)#define u8AHI_WakeTimerStatus         ((tpru8AHI_WakeTimerStatus)         0x42d8)#define u32AHI_WakeTimerCalibrate     ((tpru32AHI_WakeTimerCalibrate)     0x4300)#define u8AHI_WakeTimerFiredStatus    ((tpru8AHI_WakeTimerFiredStatus)    0x436c)/* GPIO */#define vAHI_DioSetDirection          ((tprvAHI_DioSetDirection)          0x27bc)#define u32AHI_DioReadInput           ((tpru32AHI_DioReadInput)           0x2858)#define vAHI_DioSetOutput             ((tprvAHI_DioSetOutput)             0x27f0)#define vAHI_DioSetPullup             ((tprvAHI_DioSetPullup)             0x2824)#define vAHI_DioWakeEdge              ((tprvAHI_DioWakeEdge)              0x287c)#define vAHI_DioWakeEnable            ((tprvAHI_DioWakeEnable)            0x28b0)#define u32AHI_DioWakeStatus          ((tpru32AHI_DioWakeStatus)          0x28e4)/* DIO aliases: DIO interrupt and DIO wake are the same thing */#define vAHI_DioInterruptEdge     (vAHI_DioWakeEdge)#define vAHI_DioInterruptEnable   (vAHI_DioWakeEnable)#define u32AHI_DioInterruptStatus (u32AHI_DioWakeStatus)/* UARTs */#define vAHI_UartEnable               ((tprvAHI_UartEnable)               0x39bc)#define vAHI_UartDisable              ((tprvAHI_UartDisable)              0x3a4c)#define vAHI_UartSetClockDivisor      ((tprvAHI_UartSetClockDivisor)      0x3ae0)#define vAHI_UartSetControl           ((tprvAHI_UartSetControl)           0x3bb0)#define vAHI_UartSetInterrupt         ((tprvAHI_UartSetInterrupt)         0x3c64)#define vAHI_UartReset                ((tprvAHI_UartReset)                0x3d30)#define u8AHI_UartReadLineStatus      ((tpru8AHI_UartReadLineStatus)      0x3db8)#define u8AHI_UartReadModemStatus     ((tpru8AHI_UartReadModemStatus)     0x3e0c)#define u8AHI_UartReadInterruptStatus ((tpru8AHI_UartReadInterruptStatus) 0x3e60)#define vAHI_UartWriteData            ((tprvAHI_UartWriteData)            0x3eb4)#define u8AHI_UartReadData            ((tpru8AHI_UartReadData)            0x3f04)#ifndef GDB#define vAHI_Uart0RegisterCallback    ((tprvAHI_Uart0RegisterCallback)    0x4088)#endif#define vAHI_Uart1RegisterCallback    ((tprvAHI_Uart0RegisterCallback)    0x40c0)/* Tick Timers */#define u32AHI_TickTimerRead          ((tpru32AHI_TickTimerRead)          0x44f4)#define vAHI_TickTimerIntPendClr      ((tprvAHI_TickTimerIntPendClr)      0x4418)#define bAHI_TickTimerIntStatus       ((tprbAHI_TickTimerIntStatus)       0x4444)#define vAHI_TickTimerWrite           ((tprvAHI_TickTimerWrite)           0x43fc)#define vAHI_TickTimerConfigure       ((tprvAHI_TickTimerConfigure)       0x4478)#define vAHI_TickTimerInterval        ((tprvAHI_TickTimerInterval)        0x4510)#define vAHI_TickTimerIntEnable       ((tprvAHI_TickTimerIntEnable)       0x44b0)#define vAHI_TickTimerInit            ((tprvAHI_TickTimerInit)            0x43b8)/* SPI master */#define vAHI_SpiReadConfiguration     ((tprvAHI_SpiReadConfiguration)     0x3484)#define vAHI_SpiRestoreConfiguration  ((tprvAHI_SpiRestoreConfiguration)  0x34dc)#define vAHI_SpiConfigure             ((tprvAHI_SpiConfigure)             0x3360)#define vAHI_SpiSelect                ((tprvAHI_SpiSelect)                0x353c)#define vAHI_SpiStop                  ((tprvAHI_SpiStop)                  0x3564)#define vAHI_SpiStartTransfer32       ((tprvAHI_SpiStartTransfer32)       0x358c)#define u32AHI_SpiReadTransfer32      ((tpru32AHI_SpiReadTransfer32)      0x35cc)#define vAHI_SpiStartTransfer16       ((tprvAHI_SpiStartTransfer16)       0x35f0)#define u16AHI_SpiReadTransfer16      ((tpru16AHI_SpiReadTransfer16)      0x3664)#define vAHI_SpiStartTransfer8        ((tprvAHI_SpiStartTransfer8)        0x365c)#define u8AHI_SpiReadTransfer8        ((tpru8AHI_SpiReadTransfer8)        0x36a0)#define bAHI_SpiPollBusy              ((tprvAHI_SpiPollBusy)              0x36c8)#define vAHI_SpiWaitBusy              ((tprvAHI_SpiWaitBusy)              0x3700)#define vAHI_SpiRegisterCallback      ((tprvAHI_SpiRegisterCallback)      0x37a4)/* Serial 2-wire interface *//* vAHI_SiConfigure is in the library: see below */#define vAHI_SiSetCmdReg              ((tprvAHI_SiSetCmdReg)              0x30b0)#define vAHI_SiWriteData8             ((tprvAHI_SiWriteData8)             0x3144)#define vAHI_SiWriteSlaveAddr         ((tprvAHI_SiWriteSlaveAddr)         0x316c)#define u8AHI_SiReadData8             ((tpru8AHI_SiReadData8)             0x31b4)#define bAHI_SiPollBusy               ((tprbAHI_SiPollBusy)               0x31dc)#define bAHI_SiPollTransferInProgress ((tprbAHI_SiPollTransferInProgress) 0x3218)#define bAHI_SiPollRxNack             ((tprbAHI_SiPollRxNack)             0x3254)#define bAHI_SiPollArbitrationLost	  ((tprbAHI_SiPollArbitrationLost) 	  0x3290)#define vAHI_SiRegisterCallback       ((tprvAHI_SiRegisterCallback)       0x3328)/* NVRAM */#define u8AHI_NvRamBase               ((tpru8AHI_NvRamBase)               0x2fac)#define vAHI_NvRamWrite               ((tprvAHI_NvRamWrite)               0x2fc8)#define u32AHI_NvRamRead              ((tpru32AHI_NvRamRead)              0x2ff8)/* Flash access */#define bAHI_FlashErase               ((tprbAHI_FlashErase)               0x292c)#define bAHI_FlashProgram             ((tprbAHI_FlashProgram)             0x29b0)#define bAHI_FlashRead                ((tprbAHI_FlashRead)                0x2b3c)/****************************************************************************//*** Library function definitions                                         ***//***                                                                      ***//*** These functions exist in the library as C code that can be linked    ***//*** dynamically at build time, so the function prototypes are 'normal'   ***//****************************************************************************//* Timers */PUBLIC void  vAHI_TimerEnable(uint8 u8Timer, uint8 u8Prescale,                              bool_t bIntRiseEnable, bool_t bIntPeriodEnable,                              bool_t bOutputEnable);PUBLIC void  vAHI_TimerDisable(uint8 u8Timer);PUBLIC void  vAHI_TimerClockSelect(uint8 u8Timer, bool_t bExternalClock,                                   bool_t bInvertClock);PUBLIC void  vAHI_TimerStartSingleShot(uint8 u8Timer, uint16 u16Hi,                                       uint16 u16Lo);PUBLIC void  vAHI_TimerStartRepeat(uint8 u8Timer, uint16 u16Hi, uint16 u16Lo);PUBLIC void  vAHI_TimerStartDeltaSigma(uint8 u8Timer, uint16 u16Hi,                                       uint16 u16Lo, bool_t bRtzEnable);PUBLIC void  vAHI_TimerStartCapture(uint8 u8Timer);PUBLIC void  vAHI_TimerReadCapture(uint8 u8Timer, uint16 *pu16Hi,                                   uint16 *pu16Lo);PUBLIC void  vAHI_TimerStop(uint8 u8Timer);PUBLIC uint8 u8AHI_TimerFired(uint8 u8Timer);PUBLIC void  vAHI_Timer0RegisterCallback(PR_HWINT_APPCALLBACK prTimer0Callback);PUBLIC void  vAHI_Timer1RegisterCallback(PR_HWINT_APPCALLBACK prTimer1Callback);/* Serial 2-wire interface */PUBLIC void vAHI_SiConfigure(bool_t bSiEnable, bool_t bInterruptEnable,                             uint16 u16PreScaler);/* Intelligent Peripheral */PUBLIC void   vAHI_IpEnable(bool_t bTxEdge, bool_t bRxEdge, bool_t bEndian);PUBLIC bool_t bAHI_IpSendData(uint8 u8Length, uint8 *pau8Data);PUBLIC bool_t bAHI_IpReadData(uint8 *pu8Length, uint8 *pau8Data);PUBLIC bool_t bAHI_IpTxDone(void);PUBLIC bool_t bAHI_IpRxDataAvailable(void);PUBLIC void   vAHI_IpRegisterCallback(PR_HWINT_APPCALLBACK prIpCallback);/****************************************************************************//***        Exported Variables                                            ***//****************************************************************************/#if defined __cplusplus}#endif#endif  /* AHI_H_INCLUDED *//****************************************************************************//***        END OF FILE                                                   ***//****************************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -