Main Page | Modules | Namespace List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

GPIOconfig.h File Reference

Functions to utilize GPIO (General Purpose Input Output) flags. More...

#include <services/services.h>

Gernal Purpose Input Output (GPIO) Support

#define gpioMask(bank, bitmask)   (T_GPIO_MASK)(((bank) << 16) + (bitmask))
 builds a gpio mask of a bitmask and a gpio bank
#define gpioBank(gpioMask)   (unsigned short)((gpioMask) >> 16)
 extracts bank information of a gpio mask
#define PF_CHANNEL_A   0
#define PF_CHANNEL_B   1
typedef unsigned long T_GPIO_MASK
 gpio mask (contains flag-bitmask and gpio bank)
typedef void(* T_GPIO_CALLBACK )(void)
void gpio_set (T_GPIO_MASK pa_nFlag)
void gpio_clear (T_GPIO_MASK pa_nFlag)
void gpio_becomeInput (T_GPIO_MASK pa_nFlag)
void gpio_becomeOutput (T_GPIO_MASK pa_nFlag)
void gpio_toggle (T_GPIO_MASK pa_nFlag)
unsigned short gpio_readFlag (T_GPIO_MASK pa_nFlag)
void * gpio_setupInterrupt (T_GPIO_MASK pa_nFlag, bool pa_bOnLevel, bool pa_bOnLow, unsigned int pa_nChannel, T_GPIO_CALLBACK pa_fnCallback)
void gpio_clearInterrupt (void *pa_pIntInfo)


Detailed Description

Functions to utilize GPIO (General Purpose Input Output) flags.

*********************************************************************

Author:
Daniel Weber, Roland Oberhammer
Date:
2005-10-23
Version:
1.0
See also:
GPIOconfig.c *

Define Documentation

#define gpioBank gpioMask   )     (unsigned short)((gpioMask) >> 16)
 

extracts bank information of a gpio mask

#define gpioMask bank,
bitmask   )     (T_GPIO_MASK)(((bank) << 16) + (bitmask))
 

builds a gpio mask of a bitmask and a gpio bank

#define PF_CHANNEL_A   0
 

#define PF_CHANNEL_B   1
 


Typedef Documentation

typedef void(* T_GPIO_CALLBACK)(void)
 


Function Documentation

void gpio_becomeInput T_GPIO_MASK  pa_nFlag  ) 
 

Parameters:
pa_nFlag sets the specified gpio flag to become input (enables the input buffer)

void gpio_becomeOutput T_GPIO_MASK  pa_nFlag  ) 
 

Parameters:
pa_nFlag sets the specified gpio flag to become output

void gpio_clear T_GPIO_MASK  pa_nFlag  ) 
 

Parameters:
pa_nFlag clears a certain gpio flag

void gpio_clearInterrupt void *  pa_pIntInfo  ) 
 

Parameters:
pa_pIntInfo handle to interrupt resource
experimental: frees resources allocated by the interrupt handler

unsigned short gpio_readFlag T_GPIO_MASK  pa_nFlag  ) 
 

Parameters:
pa_nFlag 

void gpio_set T_GPIO_MASK  pa_nFlag  ) 
 

Parameters:
pa_nFlag sets a certain gpio flag

void* gpio_setupInterrupt T_GPIO_MASK  pa_nFlag,
bool  pa_bOnLevel,
bool  pa_bOnLow,
unsigned int  pa_nChannel,
T_GPIO_CALLBACK  pa_fnCallback
 

Parameters:
pa_nFlag 
pa_bOnLevel 
pa_bOnLow 
pa_nChannel 
pa_fnCallback 
Returns:
handle to interrupt resource
experimental: sets up a interrupt for gpio flag

void gpio_toggle T_GPIO_MASK  pa_nFlag  ) 
 

Parameters:
pa_nFlag toggles a certain gpio flag


Generated on Thu Mar 2 16:11:30 2006 for VDK Blacksheep by  doxygen 1.4.1