Herzog Library 00.00.01
rel_libdev.herzog.00.00.01.10606
|
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | GPIO_CONFIG_t |
A structure to represent GPIO configuration. More... | |
struct | GPIOD_SFRS_t |
A structure to represent Special Function Registers for GPIOD block. More... | |
struct | GPIOE_SFRS_t |
A structure to represent Special Function Registers for GPIOE block. More... | |
struct | GPIOF_SFRS_t |
A structure to represent Special Function Registers for GPIOF block. More... | |
struct | GPIO_MODE_SFRS_t |
A structure to represent Special Function Registers for GPIO Mode. More... | |
Macros | |
#define | E_GPIO_PIN_MODE_OFF 0 |
#define | E_GPIO_PIN_MODE_ON 1 |
#define | E_GPIO_PIN_NOINVERT 0 |
#define | E_GPIO_PIN_INVERT 1 |
#define | E_GPIO_PIN_NOSWAP 0 |
#define | E_GPIO_PIN_SWAP 1 |
#define | E_GPIOD_BITWIDTH 8 |
#define | E_GPIOE_BITWIDTH 8 |
#define | E_GPIOF_BITWIDTH 3 |
#define | GPIOD_SFRS ((__IO GPIOD_SFRS_t *)(0x50000062)) |
#define | GPIOE_SFRS ((__IO GPIOE_SFRS_t *)(0x50000063)) |
#define | GPIOF_SFRS ((__IO GPIOF_SFRS_t *)(0x50000064)) |
#define | GPIO_MODE_SFRS ((__IO GPIO_MODE_SFRS_t *)(0x50000065)) |
Functions | |
void | GPIOD_EnablePullUp (uint8_t pos, bool bit) |
Enable/disable pull up on GPIOD. More... | |
void | GPIOD_EnablePullDown (uint8_t pos, bool bit) |
Enable/disable pull down on GPIOD. More... | |
void | GPIOD_EnableOutput (uint8_t pos, bool bit) |
Enable/disable output on GPIOD. More... | |
void | GPIOD_EnableInput (uint8_t pos, bool bit) |
Enable/disable Input on GPIOD. More... | |
void | GPIOD_EnableInterrupt (uint8_t pos, bool bit) |
Enable/disable interrupt on GPIOD. More... | |
uint8_t | GPIOD_Read (uint8_t pos) |
Read pin state on GPIOD. More... | |
void | GPIOD_Set (uint8_t pos, uint8_t bit) |
Set pin state on GPIOD. More... | |
void | GPIOD_EnablePortPullUp (bool bit, uint8_t mask) |
Enable/disable pull up bits on GPIOD. More... | |
void | GPIOD_EnablePortPullDown (bool bit, uint8_t mask) |
Enable/disable pull down on GPIOD. More... | |
void | GPIOD_EnablePortOutput (bool bit, uint8_t mask) |
Enable/disable output enable bits on GPIOD. More... | |
void | GPIOD_EnablePortInput (bool bit, uint8_t mask) |
Enable/disable input enable bits on GPIOD. More... | |
void | GPIOD_EnablePortInterrupt (bool bit, uint8_t mask) |
Enable/disable interrupt enable bits on GPIOD. More... | |
void | GPIOD_PortSet (uint8_t val, uint8_t mask) |
Set port value on GPIOD. More... | |
uint8_t | GPIOD_PortRead (uint8_t mask) |
Read port value from GPIOD. More... | |
void | GPIOE_EnablePullUp (uint8_t pos, bool bit) |
Enable/disable pull up on GPIOE. More... | |
void | GPIOE_EnablePullDown (uint8_t pos, bool bit) |
Enable/disable pull down on GPIOE. More... | |
void | GPIOE_EnableOutput (uint8_t pos, bool bit) |
Enable/disable output on GPIOE. More... | |
void | GPIOE_EnableInput (uint8_t pos, bool bit) |
Enable/disable Input on GPIOE. More... | |
void | GPIOE_EnableInterrupt (uint8_t pos, bool bit) |
Enable/disable interrupt on GPIOE. More... | |
uint8_t | GPIOE_Read (uint8_t pos) |
Read pin state on GPIOE. More... | |
void | GPIOE_Set (uint8_t pos, uint8_t bit) |
Set pin state on GPIOE. More... | |
void | GPIOE_EnablePortPullUp (bool bit, uint8_t mask) |
Enable/disable pull up bits on GPIOE. More... | |
void | GPIOE_EnablePortPullDown (bool bit, uint8_t mask) |
Enable/disable pull down on GPIOE. More... | |
void | GPIOE_EnablePortOutput (bool bit, uint8_t mask) |
Enable/disable output enable bits on GPIOE. More... | |
void | GPIOE_EnablePortInput (bool bit, uint8_t mask) |
Enable/disable input enable bits on GPIOE. More... | |
void | GPIOE_EnablePortInterrupt (bool bit, uint8_t mask) |
Enable/disable interrupt enable bits on GPIOE. More... | |
void | GPIOE_PortSet (uint8_t val, uint8_t mask) |
Set port value on GPIOE. More... | |
uint8_t | GPIOE_PortRead (uint8_t mask) |
Read port value from GPIOE. More... | |
void | GPIOF_EnablePullUp (uint8_t pos, bool bit) |
Enable/disable pull up on GPIOF. More... | |
void | GPIOF_EnablePullDown (uint8_t pos, bool bit) |
Enable/disable pull down on GPIOF. More... | |
void | GPIOF_EnableOutput (uint8_t pos, bool bit) |
Enable/disable output on GPIOF. More... | |
void | GPIOF_EnableInput (uint8_t pos, bool bit) |
Enable/disable Input on GPIOF. More... | |
void | GPIOF_EnableInterrupt (uint8_t pos, bool bit) |
Enable/disable interrupt on GPIOF. More... | |
uint8_t | GPIOF_Read (uint8_t pos) |
Read pin state on GPIOF. More... | |
void | GPIOF_Set (uint8_t pos, uint8_t bit) |
Set pin state on GPIOF. More... | |
void | GPIOF_EnablePortPullUp (bool bit, uint8_t mask) |
Enable/disable pull up bits on GPIOF. More... | |
void | GPIOF_EnablePortPullDown (bool bit, uint8_t mask) |
Enable/disable pull down on GPIOF. More... | |
void | GPIOF_EnablePortOutput (bool bit, uint8_t mask) |
Enable/disable output enable bits on GPIOF. More... | |
void | GPIOF_EnablePortInput (bool bit, uint8_t mask) |
Enable/disable input enable bits on GPIOF. More... | |
void | GPIOF_EnablePortInterrupt (bool bit, uint8_t mask) |
Enable/disable interrupt enable bits on GPIOF. More... | |
void | GPIOF_PortSet (uint8_t val, uint8_t mask) |
Set port value on GPIOF. More... | |
uint8_t | GPIOF_PortRead (uint8_t mask) |
Read port value from GPIOF. More... | |
void | GPIO_ConfigUART (uint8_t mode, uint8_t swap, uint8_t invert) |
Config GPIO pin to UART mode. More... | |
void | GPIO_ConfigSPI (uint8_t mode) |
Config GPIO pin to SPI mode. 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 E_GPIO_PIN_INVERT 1 |
#define E_GPIO_PIN_MODE_OFF 0 |
#define E_GPIO_PIN_MODE_ON 1 |
#define E_GPIO_PIN_NOINVERT 0 |
#define E_GPIO_PIN_NOSWAP 0 |
#define E_GPIO_PIN_SWAP 1 |
#define E_GPIOD_BITWIDTH 8 |
#define E_GPIOE_BITWIDTH 8 |
#define E_GPIOF_BITWIDTH 3 |
#define GPIO_MODE_SFRS ((__IO GPIO_MODE_SFRS_t *)(0x50000065)) |
#define GPIOD_SFRS ((__IO GPIOD_SFRS_t *)(0x50000062)) |
#define GPIOE_SFRS ((__IO GPIOE_SFRS_t *)(0x50000063)) |
#define GPIOF_SFRS ((__IO GPIOF_SFRS_t *)(0x50000064)) |
void GPIO_ConfigSPI | ( | uint8_t | mode | ) |
Config GPIO pin to SPI mode.
mode | GPIO mode or non GPIO mode (SPI mode). |
void GPIO_ConfigUART | ( | uint8_t | mode, |
uint8_t | swap, | ||
uint8_t | invert | ||
) |
Config GPIO pin to UART mode.
mode | GPIO mode or non GPIO mode (UART mode). |
swap | The pin swap setting. |
invert | The polarity setting. |
void GPIOD_EnableInput | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable Input on GPIOD.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOD_EnableInterrupt | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable interrupt on GPIOD.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOD_EnableOutput | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable output on GPIOD.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOD_EnablePortInput | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable input enable bits on GPIOD.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOD_EnablePortInterrupt | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable interrupt enable bits on GPIOD.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOD_EnablePortOutput | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable output enable bits on GPIOD.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOD_EnablePortPullDown | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable pull down on GPIOD.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOD_EnablePortPullUp | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable pull up bits on GPIOD.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOD_EnablePullDown | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable pull down on GPIOD.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOD_EnablePullUp | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable pull up on GPIOD.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
uint8_t GPIOD_PortRead | ( | uint8_t | mask | ) |
Read port value from GPIOD.
mask | The bit mask for the pins to be read. |
void GPIOD_PortSet | ( | uint8_t | val, |
uint8_t | mask | ||
) |
Set port value on GPIOD.
val | The value to be set to GPIO port. |
mask | The bit mask for the pins to be configured. |
uint8_t GPIOD_Read | ( | uint8_t | pos | ) |
Read pin state on GPIOD.
pos | The pin position. |
void GPIOD_Set | ( | uint8_t | pos, |
uint8_t | bit | ||
) |
Set pin state on GPIOD.
pos | The pin position. |
bit | The pin state. |
void GPIOE_EnableInput | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable Input on GPIOE.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOE_EnableInterrupt | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable interrupt on GPIOE.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOE_EnableOutput | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable output on GPIOE.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOE_EnablePortInput | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable input enable bits on GPIOE.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOE_EnablePortInterrupt | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable interrupt enable bits on GPIOE.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOE_EnablePortOutput | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable output enable bits on GPIOE.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOE_EnablePortPullDown | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable pull down on GPIOE.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOE_EnablePortPullUp | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable pull up bits on GPIOE.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOE_EnablePullDown | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable pull down on GPIOE.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOE_EnablePullUp | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable pull up on GPIOE.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
uint8_t GPIOE_PortRead | ( | uint8_t | mask | ) |
Read port value from GPIOE.
mask | The bit mask for the pins to be read. |
void GPIOE_PortSet | ( | uint8_t | val, |
uint8_t | mask | ||
) |
Set port value on GPIOE.
val | The value to be set to GPIO port. |
mask | The bit mask for the pins to be configured. |
uint8_t GPIOE_Read | ( | uint8_t | pos | ) |
Read pin state on GPIOE.
pos | The pin position. |
void GPIOE_Set | ( | uint8_t | pos, |
uint8_t | bit | ||
) |
Set pin state on GPIOE.
pos | The pin position. |
bit | The pin state. |
void GPIOF_EnableInput | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable Input on GPIOF.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOF_EnableInterrupt | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable interrupt on GPIOF.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOF_EnableOutput | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable output on GPIOF.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOF_EnablePortInput | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable input enable bits on GPIOF.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOF_EnablePortInterrupt | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable interrupt enable bits on GPIOF.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOF_EnablePortOutput | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable output enable bits on GPIOF.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOF_EnablePortPullDown | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable pull down on GPIOF.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOF_EnablePortPullUp | ( | bool | bit, |
uint8_t | mask | ||
) |
Enable/disable pull up bits on GPIOF.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
void GPIOF_EnablePullDown | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable pull down on GPIOF.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
void GPIOF_EnablePullUp | ( | uint8_t | pos, |
bool | bit | ||
) |
Enable/disable pull up on GPIOF.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
uint8_t GPIOF_PortRead | ( | uint8_t | mask | ) |
Read port value from GPIOF.
mask | The bit mask for the pins to be read. |
void GPIOF_PortSet | ( | uint8_t | val, |
uint8_t | mask | ||
) |
Set port value on GPIOF.
val | The value to be set to GPIO port. |
mask | The bit mask for the pins to be configured. |
uint8_t GPIOF_Read | ( | uint8_t | pos | ) |
Read pin state on GPIOF.
pos | The pin position. |
void GPIOF_Set | ( | uint8_t | pos, |
uint8_t | bit | ||
) |
Set pin state on GPIOF.
pos | The pin position. |
bit | The pin state. |