Search by Tags

Int Lib API

 

Article updated at 28 Oct 2017
Compare with Revision




Attention: 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_IR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GR2D = 104, TEG_IRQ_DISPLAY, 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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5 
TEG_IRQ_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] dwPhysBase Physical Base
[in] dwSize Size
Return values
Virtual address
BOOL FreeIntChainHandlerCompat ( HANDLE  hInstance )

Win CE 5.0/6.0/7.0 compatible version of FreeIntChainHandler()

Parameters
[in] hInstance Instance Handle
Return values
True Success
False Failure
DWORD GetGPIOIrq ( DWORD  dwGpio )

Get the IRQ for a specific GPIO Pin

Parameters
[in] dwGpio GPIO Pin Number
Return values
IRQ Number
void InterruptDisableCompat ( DWORD  idInt )

Win CE 5.0/6.0/7.0 compatible version of InterruptDisable()

Parameters
[in] idInt Interrupt ID
void InterruptDoneCompat ( DWORD  idInt )

Win CE 5.0/6.0/7.0 compatible version of Interrupt()

Parameters
[in] idInt Interrupt 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] idInt Interrupt ID
[in] hEvent Event Handle
[in] pvData Pointer to data buffer
[in] cbData Size of data buffer
Return values
True Success
False Failure
void INTGetLibVersion ( DWORD *  pVerMaj,
DWORD *  pVerMin,
DWORD *  pBuild
)

Outputs library version

Parameters
[out] verMaj Major version number. Set this parameter to NULL if not required
[out] verMin Minor version number. Set this parameter to NULL if not required
[out] build Build 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] hModule Module Handle returned by LoadIntChainHandlerCompat()
[in] dwIoControlCode IO Control Code
[in] lpInBuf Pointer to Input Buffer
[in] nInBufSize Input Buffer Size in bytes
[in] lpOutBuf Pointer to Output Buffer
[in] nOutBufSize Output Buffer Size
[out] lpBytesReturned Number of bytes returned
Return values
True Success
False Failure
HANDLE LoadIntChainHandlerCompat ( LPCWSTR  lpFilename,
LPCWSTR  lpszFunctionName,
BYTE  bIRQ
)

Win CE 5.0/6.0/7.0 compatible version of LoadIntChainHandler()

Parameters
[in] lpFilename Pointer to Filename
[in] lpszFunctionName Function Name String
[in] bIRQ IRQ Number
Return values
HANDLE Instance Handle
BOOL ReleaseSysIntr ( DWORD  dwSysIntr )

Release the specified system interrupt

Parameters
[in] dwSysIntr System Interrupt Number
Return values
True Success
False Failure
DWORD RequestSysInterrupt ( DWORD  dwIrq )

Get the System Interrupt Number for the specified IRQ

Parameters
[in] dwIRQ IRQ Number
Return values
System Interrupt Number
BOOL SetGPIOIrqEdge ( DWORD  dwGpio,
DWORD  dwEdge
)

Set the GPIO Interrupt Edge Detect

Parameters
[in] dwGpio GPIO Pin Number
[in] dwEdge GPIO_EDGE_RISING or GPIO_EDGE_FALLING
Return values
True Success
False Failure