Skip to main content

Int Lib API

danger

this is a legacy library and thus not supported by Toradex anymore. We recommend that you use the new libraries for all Toradex modules. Please see the Toradex CE Libraries and Code Samples for up-to-date information.


Header file for the Interrupt Library. More...

Macros

##define INT_VER_MAJ   2 #define INT_VER_MIN   6 #define INT_VER_BUILD   0 #define GPIO_EDGE_RISING   1 Defines for Interrupt Edge Detect. More...
 #define GPIO_EDGE_FALLING   2 #define GPIO_LEVEL_HIGH   (GPIO_EDGE_RISING | 4) Defines for Interrupt Level Detect. More...
 #define GPIO_LEVEL_LOW   (GPIO_EDGE_FALLING| 4) 

Enumerations

enum  tegraIrqNumbers {
  TEG_IRQ_SGI0 = 0, TEG_IRQ_SGI1, TEG_IRQ_SGI2, TEG_IRQ_SGI3,
  TEG_IRQ_SGI4, TEG_IRQ_SGI5, TEG_IRQ_SGI6, TEG_IRQ_SGI7,
  TEG_IRQ_SGI8 = 8, TEG_IRQ_SGI9, TEG_IRQ_SGI10, TEG_IRQ_SGI11,
  TEG_IRQ_SGI12, TEG_IRQ_SGI13, TEG_IRQ_SGI14, TEG_IRQ_SGI15,
  TEG_IRQ_GLOBAL_TIMER = 27, TEG_IRQ_LEGACY_FIQ = 28, TEG_IRQ_PRIVATE_TIMER = 29, TEG_IRQ_WATCHDOG_TIMERS = 30,
  TEG_IRQ_LEGACY_IRQ = 31, TEG_IRQ_TMR1 = 32, TEG_IRQ_TMR2, TEG_IRQ_RTC,
  TEG_IRQ_I2S2, TEG_IRQ_SHR_SEM_INBOX_FULL, TEG_IRQ_SHR_SEM_INBOX_EMPTY, TEG_IRQ_SHR_SEM_OUTBOX_FULL,
  TEG_IRQ_SHR_SEM_OUTBOX_EMPTY, TEG_IRQ_VDE_UCQ = 40, TEG_IRQ_VDE_SYNC_TOKEN, TEG_IRQ_VDE_BSEV,
  TEG_IRQ_VDE_BSEA, TEG_IRQ_VDE_SXE, TEG_IRQ_I2S1, TEG_IRQ_SDMMC1,
  TEG_IRQ_SDMMC2, TEG_IRQ_XIO = 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TEG_IRQ_DISPLAYB,
  TEG_IRQ_HDMI, TEG_IRQ_TVO, TEG_IRQ_MC, TEG_IRQ_EMC,
  TEG_IRQ_NONE2, TEG_IRQ_NOR_FLASH = 112, TEG_IRQ_AC97, TEG_IRQ_SBC2,
  TEG_IRQ_SBC3, TEG_IRQ_I2C2, TEG_IRQ_KBC, TEG_IRQ_PMU_EXT,
  TEG_IRQ_GPIO6, TEG_IRQ_TVDAC = 120, TEG_IRQ_GPIO7, TEG_IRQ_UART4,
  TEG_IRQ_UART5, TEG_IRQ_I2C3, TEG_IRQ_SBC4, TEG_IRQ_NONE3,
  TEG_IRQ_SW_INTR, TEG_IRQ_SNOR = 128, TEG_IRQ_USB3, TEG_IRQ_PCIE_INT,
  TEG_IRQ_PCIE_MSI, TEG_IRQ_PCIE_WAKE, TEG_IRQ_NONE4, TEG_IRQ_NONE5,
  TEG_IRQ_NONE6, TEG_IRQ_APB_DMA_CH0 = 136, TEG_IRQ_APB_DMA_CH1, TEG_IRQ_APB_DMA_CH2,
  TEG_IRQ_APB_DMA_CH3, TEG_IRQ_APB_DMA_CH4, TEG_IRQ_APB_DMA_CH5, TEG_IRQ_APB_DMA_CH6,
  TEG_IRQ_APB_DMA_CH7, TEG_IRQ_APB_DMA_CH8 = 144, TEG_IRQ_APB_DMA_CH9, TEG_IRQ_APB_DMA_CH10,
  TEG_IRQ_APB_DMA_CH11, TEG_IRQ_APB_DMA_CH12, TEG_IRQ_APB_DMA_CH13, TEG_IRQ_APB_DMA_CH14,
  TEG_IRQ_APB_DMA_CH15, TEG_IRQ_I2C4 = 152, TEG_IRQ_NONE8, TEG_IRQ_NONE9,
  TEG_IRQ_NONE10, TEG_IRQ_NONE11, TEG_IRQ_NONE12, TEG_IRQ_NONE13,
  TEG_IRQ_NONE14
}
 Tegra IRQ numbers. More...
 

Functions

HANDLE LoadIntChainHandlerCompat (LPCWSTR lpFilename, LPCWSTR lpszFunctionName, BYTE bIRQ)
 
BOOL FreeIntChainHandlerCompat (HANDLE hInstance)
 
BOOL InterruptInitializeCompat (DWORD idInt, HANDLE hEvent, LPVOID pvData, DWORD cbData)
 
void InterruptDisableCompat (DWORD idInt)
 
void InterruptDoneCompat (DWORD idInt)
 
LPVOID CreateStaticMappingCompat (DWORD dwPhysBase, DWORD dwSize)
 
BOOL KernelLibIoControlCompat (HANDLE hModule, DWORD dwIoControlCode, LPVOID lpInBuf, DWORD nInBufSize, LPVOID lpOutBuf, DWORD nOutBufSize, LPDWORD lpBytesReturned)
 
DWORD GetGPIOIrq (DWORD dwGpio)
 
BOOL SetGPIOIrqEdge (DWORD dwGpio, DWORD dwEdge)
 
DWORD RequestSysInterrupt (DWORD dwIrq)
 
BOOL ReleaseSysIntr (DWORD dwSysIntr)
 
void INTGetLibVersion (DWORD *pVerMaj, DWORD *pVerMin, DWORD *pBuild)
 

Detailed Description

Header file for the Interrupt Library.
Author
andy.kiser
Rev
2863
Date
2015-06-26 17:18:52 +0200 (Fr, 26 Jun 2015)
Target Platforms:
PXAxxx, Txx

Macro Definition Documentation

#define GPIO_EDGE_FALLING   2
#define GPIO_EDGE_RISING   1
Defines for Interrupt Edge Detect.
#define GPIO_LEVEL_HIGH   (GPIO_EDGE_RISING | 4)
Defines for Interrupt Level Detect.
#define GPIO_LEVEL_LOW   (GPIO_EDGE_FALLING | 4)
#define INT_VER_BUILD   0
#define INT_VER_MAJ   2
#define INT_VER_MIN   6

Enumeration Type Documentation

Tegra IRQ numbers.
Enumerator
TEG_IRQ_SGI0  
TEG_IRQ_SGI1  
TEG_IRQ_SGI2  
TEG_IRQ_SGI3  
TEG_IRQ_SGI4  
TEG_IRQ_SGI5  
TEG_IRQ_SGI6  
TEG_IRQ_SGI7  
TEG_IRQ_SGI8  
TEG_IRQ_SGI9  
TEG_IRQ_SGI10  
TEG_IRQ_SGI11  
TEG_IRQ_SGI12  
TEG_IRQ_SGI13  
TEG_IRQ_SGI14  
TEG_IRQ_SGI15  
TEG_IRQ_GLOBAL_TIMER  
TEG_IRQ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Q_APB_DMA_CH6  
TEG_IRQ_APB_DMA_CH7  
TEG_IRQ_APB_DMA_CH8  
TEG_IRQ_APB_DMA_CH9  
TEG_IRQ_APB_DMA_CH10  
TEG_IRQ_APB_DMA_CH11  
TEG_IRQ_APB_DMA_CH12  
TEG_IRQ_APB_DMA_CH13  
TEG_IRQ_APB_DMA_CH14  
TEG_IRQ_APB_DMA_CH15  
TEG_IRQ_I2C4  
TEG_IRQ_NONE8  
TEG_IRQ_NONE9  
TEG_IRQ_NONE10  
TEG_IRQ_NONE11  
TEG_IRQ_NONE12  
TEG_IRQ_NONE13  
TEG_IRQ_NONE14  

Function Documentation

LPVOID CreateStaticMappingCompat(DWORD dwPhysBase,
  DWORD dwSize 
 )  
Win CE 5.0/6.0/7.0 compatible version of CreateStaticMapping()
Parameters
[in]dwPhysBasePhysical Base
[in]dwSizeSize
Return values
Virtualaddress
BOOL FreeIntChainHandlerCompat(HANDLE hInstance) 
Win CE 5.0/6.0/7.0 compatible version of FreeIntChainHandler()
Parameters
[in]hInstanceInstance Handle
Return values
TrueSuccess
FalseFailure
DWORD GetGPIOIrq(DWORD dwGpio) 
Get the IRQ for a specific GPIO Pin
Parameters
[in]dwGpioGPIO Pin Number
Return values
IRQNumber
void InterruptDisableCompat(DWORD idInt) 
Win CE 5.0/6.0/7.0 compatible version of InterruptDisable()
Parameters
[in]idIntInterrupt ID
void InterruptDoneCompat(DWORD idInt) 
Win CE 5.0/6.0/7.0 compatible version of Interrupt()
Parameters
[in]idIntInterrupt ID
BOOL InterruptInitializeCompat(DWORD idInt,
  HANDLE hEvent,
  LPVOID pvData,
  DWORD cbData 
 )  
Win CE 5.0/6.0/7.0 compatible version of InterruptInitialize()
Parameters
[in]idIntInterrupt ID
[in]hEventEvent Handle
[in]pvDataPointer to data buffer
[in]cbDataSize of data buffer
Return values
TrueSuccess
FalseFailure
void INTGetLibVersion(DWORD * pVerMaj,
  DWORD * pVerMin,
  DWORD * pBuild 
 )  
Outputs library version
Parameters
[out]verMajMajor version number. Set this parameter to NULL if not required
[out]verMinMinor version number. Set this parameter to NULL if not required
[out]buildBuild number. Set this parameter to NULL if not required
BOOL KernelLibIoControlCompat(HANDLE hModule,
  DWORD dwIoControlCode,
  LPVOID lpInBuf,
  DWORD nInBufSize,
  LPVOID lpOutBuf,
  DWORD nOutBufSize,
  LPDWORD lpBytesReturned 
 )  
Win CE 5.0/6.0/7.0 compatible version of KernelLibIoControl()
Parameters
[in]hModuleModule Handle returned by LoadIntChainHandlerCompat()
[in]dwIoControlCodeIO Control Code
[in]lpInBufPointer to Input Buffer
[in]nInBufSizeInput Buffer Size in bytes
[in]lpOutBufPointer to Output Buffer
[in]nOutBufSizeOutput Buffer Size
[out]lpBytesReturnedNumber of bytes returned
Return values
TrueSuccess
FalseFailure
HANDLE LoadIntChainHandlerCompat(LPCWSTR lpFilename,
  LPCWSTR lpszFunctionName,
  BYTE bIRQ 
 )  
Win CE 5.0/6.0/7.0 compatible version of LoadIntChainHandler()
Parameters
[in]lpFilenamePointer to Filename
[in]lpszFunctionNameFunction Name String
[in]bIRQIRQ Number
Return values
HANDLEInstance Handle
BOOL ReleaseSysIntr(DWORD dwSysIntr) 
Release the specified system interrupt
Parameters
[in]dwSysIntrSystem Interrupt Number
Return values
TrueSuccess
FalseFailure
DWORD RequestSysInterrupt(DWORD dwIrq) 
Get the System Interrupt Number for the specified IRQ
Parameters
[in]dwIRQIRQ Number
Return values
SystemInterrupt Number
BOOL SetGPIOIrqEdge(DWORD dwGpio,
  DWORD dwEdge 
 )  
Set the GPIO Interrupt Edge Detect
Parameters
[in]dwGpioGPIO Pin Number
[in]dwEdgeGPIO_EDGE_RISING or GPIO_EDGE_FALLING
Return values
TrueSuccess
FalseFailure
Send Feedback!