Herzog Library 00.00.01
rel_libdev.herzog.00.00.01.10606
|
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "gpio_device.h"
Typedefs | |
typedef void(* | func_ptr_t) (void) |
Functions | |
int32_t | GPIO_devSet (GPIO_Device_t *dev, uint8_t pos, uint8_t state) |
Set GPIO pin state. More... | |
int32_t | GPIO_devRead (GPIO_Device_t *dev, uint8_t pos) |
Read GPIO pin state. More... | |
int32_t | GPIO_devInit (GPIO_Device_t *dev, uint8_t pos, uint32_t mode) |
Initialize a GPIO pin. More... | |
int32_t | GPIO_devRegisterIRQ (GPIO_Device_t *dev, void *cb) |
Register a callback function to GPIO interrupt handler. More... | |
int32_t | GPIO_devUnregisterIRQ (GPIO_Device_t *dev, void *cb) |
Unregister a callback function to GPIO interrupt handler. More... | |
void | PIN_Handler (void) |
GPIO_Device_t * | GPIO_devRequest (const char *name) |
Request a GPIO Device. More... | |
int32_t | GPIO_devInitPort (GPIO_Device_t *dev, uint8_t mask, uint32_t mode) |
Initialize a GPIO port. More... | |
int32_t | GPIO_devPortSet (GPIO_Device_t *dev, uint8_t mask, uint8_t val) |
Set GPIO port. More... | |
int32_t | GPIO_devPortRead (GPIO_Device_t *dev, uint8_t mask) |
Read GPIO pin state. More... | |
Variables | |
static const GPIO_Device_t * | GPIO_DeviceTable [] |
The table of GPIO device instances supported by the platform. More... | |
static func_ptr_t | cb_func = NULL |
This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.
typedef void(* func_ptr_t) (void) |
int32_t GPIO_devInit | ( | GPIO_Device_t * | dev, |
uint8_t | pos, | ||
uint32_t | mode | ||
) |
Initialize a GPIO pin.
dev | Pointer to the GPIO device |
pos | Pin position to the GPIO device. |
mode | Bit mask indicating the combination of the mode for this pin. |
int32_t GPIO_devInitPort | ( | GPIO_Device_t * | dev, |
uint8_t | mask, | ||
uint32_t | mode | ||
) |
Initialize a GPIO port.
dev | Pointer to the GPIO device |
mask | The bit mask in the GPIO port to be configured. |
mode | The bit mask indicating the combination of the mode for this port. |
int32_t GPIO_devPortRead | ( | GPIO_Device_t * | dev, |
uint8_t | mask | ||
) |
Read GPIO pin state.
dev | Pointer to the GPIO device. |
mask | The bit mask in the GPIO port to be read. |
int32_t GPIO_devPortSet | ( | GPIO_Device_t * | dev, |
uint8_t | mask, | ||
uint8_t | val | ||
) |
Set GPIO port.
dev | Pointer to the GPIO device. |
mask | The bit mask in the GPIO port to be set. |
val | The value to be programmed to the GPIO port. |
int32_t GPIO_devRead | ( | GPIO_Device_t * | dev, |
uint8_t | pos | ||
) |
Read GPIO pin state.
dev | Pointer to the GPIO device. |
pos | Pin position to the GPIO device. |
int32_t GPIO_devRegisterIRQ | ( | GPIO_Device_t * | dev, |
void * | cb | ||
) |
Register a callback function to GPIO interrupt handler.
dev | Pointer to the GPIO device. |
cb | The callback function to be registered. |
GPIO_Device_t* GPIO_devRequest | ( | const char * | name | ) |
Request a GPIO Device.
name | The name string of GPIO device. |
int32_t GPIO_devSet | ( | GPIO_Device_t * | dev, |
uint8_t | pos, | ||
uint8_t | state | ||
) |
Set GPIO pin state.
dev | Pointer to the GPIO device. |
pos | Pin position to the GPIO device. |
state | Pin state, 0 for low level, none zone for high level. |
int32_t GPIO_devUnregisterIRQ | ( | GPIO_Device_t * | dev, |
void * | cb | ||
) |
Unregister a callback function to GPIO interrupt handler.
dev | Pointer to the GPIO device. |
cb | The callback function to be unregistered. |
void PIN_Handler | ( | void | ) |
|
static |
|
static |
The table of GPIO device instances supported by the platform.