pitx-sp_gpio - GPIO driver for pITX-SP
pitxGpioGetCount( ) - get number of active GPIOs
pitxGpioGetDirectionCaps( ) - get possible directions of a selected GPIO
pitxGpioGetDirection( ) - get the current direction of a selected GPIO (1 - output)
pitxGpioSetDirection( ) - set direction for a selected GPIO
pitxGpioGetLevel( ) - get level of a selected input GPIO
pitxGpioSetLevel( ) - set level of a selected output GPIO
pitxGpioSetTriState( ) - enable tri-state for a selected output GPIO
pitxGpioIntEnable( ) - enable/disable interrupt for a selected GPIO
pitxGpioSetIntPolarity( ) - set interrupt polarity (rising or falling edge) for a selected GPIO
Functions to control GPIOs implemented in the pITX-SP CPLD. (KEAPI compatible).
For details see: KTD-S0003-C pITX-SP Software Guide
pitxGpioGetCount( ) - get number of active GPIOs
void pitxGpioGetCount(UINT32 *pGpioCount)
This function returns the number of active GPIOs
pGpioCount [out] - number of active GPIOs
N/A
pitx
pitxGpioGetDirectionCaps( ) - get possible directions of a selected GPIO
void pitxGpioGetDirectionCaps(UINT32 gpioNr, BOOL *pIsInput, BOOL *pIsOutput)
This function returns possible directions of a selected GPIO
gpioNr [in] - number of GPIO.
pIsInput [out] - TRUE if input is supported.
pIsOutput [out] - TRUE if output is supported.
N/A
pitx
pitxGpioGetDirection( ) - get the current direction of a selected GPIO (1 - output)
void pitxGpioGetDirection(UINT32 gpioNr, UINT8 *pDir)
This function returns the current direction of a selected GPIO
gpioNr [in] - number of GPIO.
pDir [out] - direction : 0 is input, 1 is output
N/A
pitx
pitxGpioSetDirection( ) - set direction for a selected GPIO
void pitxGpioSetDirection(UINT32 gpioNr, UINT8 dir)
This function sets direction for a selected GPIO
gpioNr [in] - number of GPIO.
dir [in] - direction : 0 is input, 1 is output
N/A
pitx
pitxGpioGetLevel( ) - get level of a selected input GPIO
void pitxGpioGetLevel(UINT32 gpioNr, UINT8 *pLevel)
This function returns level of a selected GPIO
gpioNr [in] - number of GPIO.
pLevel [out] - level : 0 or 1
N/A
pitx
pitxGpioSetLevel( ) - set level of a selected output GPIO
void pitxGpioSetLevel(UINT32 gpioNr, UINT8 Level)
This function sets level of a selected output GPIO
gpioNr [in] - number of GPIO.
Level [in] - level : 0 or 1
N/A
pitx
pitxGpioSetTriState( ) - enable tri-state for a selected output GPIO
void pitxGpioSetTriState(UINT32 gpioNr, UINT8 State)
This function sets/resets tri-state for a selected GPIO
gpioNr [in] - number of GPIO.
State [in] - 1 : tri-state is enabled; 0 : normal output
N/A
pitx
pitxGpioIntEnable( ) - enable/disable interrupt for a selected GPIO
void pitxGpioIntEnable(UINT32 gpioNr, UINT8 State)
This function enables/disables interrupt for a selected GPIO
gpioNr [in] - number of GPIO.
State [in] - 1 : interrupt is enabled; 0 : interrupt is disabled
N/A
pitx
pitxGpioSetIntPolarity( ) - set interrupt polarity (rising or falling edge) for a selected GPIO
void pitxGpioSetIntPolarity(UINT32 gpioNr, UINT8 Pol)
This function sets interupt polarity for a selected GPIO
gpioNr [in] - number of GPIO.
Pol [in] - 1 : rising edge; 0 : falling edge
N/A
pitx