18 #ifndef _AVRIO_GPIO_H_ 19 #define _AVRIO_GPIO_H_ 21 #include <avrio/defs.h> 24 #include <avrio/dpin.h> 137 # if defined(__DOXYGEN__) 202 static inline bool bGpioRead (uint8_t ucPin);
215 #include "avrio-config.h" 216 #ifdef AVRIO_GPIO_ENABLE 217 #include "avrio-board-gpio.h" 220 struct xGpioContext {
221 xDPin pin[GPIO_SIZE];
229 extern struct xGpioContext gpio;
250 return gpio.pin[ucPin].mode;
257 return gpio.pin[ucPin].edge;
264 return bDpRead (&gpio.pin[ucPin]);
271 gpio.callback = callback;
278 return gpio.callback;
283 pvGpioUserData (
void) {
static eDpEdge eGpioPinEdge(uint8_t ucPin)
Front(s) déclenchant d'une entrée.
eDpEdge
Front d'entrée.
static void * pGpioUserData(void)
Données d'un gestionnaire d'interruption utilisateur.
static void vGpioSetPinMode(uint8_t ucPin, eDpMode eMode)
Modifie le mode de la broche.
static void vGpioSetCallback(vGpioCallback callback)
Modification du gestionnaire de changement d'état.
uGpioMask uGpioReadAll(uGpioMask uPinMask)
Lecture de l'état binaire d'un ensemble de broches.
static void vGpioSetUserData(void *udata)
Modification données utilisateur.
void vGpioWriteAll(uGpioMask uPinMask, bool bValue)
Modification de l'état binaire de plusieurs sorties.
void vGpioPoll(void)
Scrutation des broches.
static vGpioCallback pvGpioCallback(void)
gestionnaire de changement d'état
void vGpioSetPinEdge(uint8_t ucPin, eDpEdge edge)
Réglage du ou des front(s) déclenchant d'une entrée.
static bool bGpioRead(uint8_t ucPin)
Lecture de l'état d'une broche (entrée ou sortie)
void vDpSetMode(xDPin *p, eDpMode eMode)
Modifie le mode de la broche.
void vGpioToggleAll(uGpioMask uPinMask)
Bascule de l'état binaire de plusieurs sorties.
bool bDpRead(const xDPin *p)
Lecture de l'état d'une broche (entrée ou sortie)
void(* vGpioCallback)(uGpioMask uPinValues, uint8_t ucPin, eDpEdge edge, void *udata)
void vGpioWrite(uint8_t ucPin, bool bValue)
Modifie l'état d'une sortie.
static eDpMode eGpioPinMode(uint8_t ucPin)
Lecture du type actuel d'une broche.
void vGpioToggle(uint8_t ucPin)
Bascule l'état d'une sortie.