|
Herzog Library 00.00.01
rel_libdev.herzog.00.00.01.10606
|
Go to the source code of this file.
Data Structures | |
| struct | GPIO_Device_t |
| A structure to represent GPIO device. More... | |
Macros | |
| #define | GPIO_MODE_INPUT 1 << 0 |
| #define | GPIO_MODE_OUTPUT 1 << 1 |
| #define | GPIO_MODE_PULLUP 1 << 2 |
| #define | GPIO_MODE_PULLDOWN 1 << 3 |
| #define | GPIO_MODE_INTERRUPT 1 << 4 |
Typedefs | |
| typedef const struct GPIO_Device_t | GPIO_Device_t |
| A structure to represent GPIO device. More... | |
Functions | |
| GPIO_Device_t * | GPIO_devRequest (const char *name) |
| Request a GPIO Device. 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... | |
| int32_t | GPIO_devInit (GPIO_Device_t *dev, uint8_t pos, uint32_t mode) |
| Initialize a GPIO pin. More... | |
| 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_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... | |
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.
| #define GPIO_MODE_INPUT 1 << 0 |
Bit mask for GPIO input enable
| #define GPIO_MODE_INTERRUPT 1 << 4 |
Bit mask for GPIO interrupt enable
| #define GPIO_MODE_OUTPUT 1 << 1 |
Bit mask for GPIO output enable
| #define GPIO_MODE_PULLDOWN 1 << 3 |
Bit mask for GPIO pull down enable
| #define GPIO_MODE_PULLUP 1 << 2 |
Bit mask for GPIO pull up enable
| typedef const struct GPIO_Device_t GPIO_Device_t |
A structure to represent GPIO device.
| 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. |
1.8.9.1