Herzog Library 00.00.01  rel_libdev.herzog.00.00.01.10606
Data Structures | Macros | Functions
gpio_sfrs.h File Reference
#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...
 

Detailed Description

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.

Macro Definition Documentation

#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))

Function Documentation

void GPIO_ConfigSPI ( uint8_t  mode)

Config GPIO pin to SPI mode.

Parameters
modeGPIO 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.

Parameters
modeGPIO mode or non GPIO mode (UART mode).
swapThe pin swap setting.
invertThe polarity setting.
void GPIOD_EnableInput ( uint8_t  pos,
bool  bit 
)

Enable/disable Input on GPIOD.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOD_EnableInterrupt ( uint8_t  pos,
bool  bit 
)

Enable/disable interrupt on GPIOD.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOD_EnableOutput ( uint8_t  pos,
bool  bit 
)

Enable/disable output on GPIOD.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOD_EnablePortInput ( bool  bit,
uint8_t  mask 
)

Enable/disable input enable bits on GPIOD.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOD_EnablePortInterrupt ( bool  bit,
uint8_t  mask 
)

Enable/disable interrupt enable bits on GPIOD.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOD_EnablePortOutput ( bool  bit,
uint8_t  mask 
)

Enable/disable output enable bits on GPIOD.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOD_EnablePortPullDown ( bool  bit,
uint8_t  mask 
)

Enable/disable pull down on GPIOD.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOD_EnablePortPullUp ( bool  bit,
uint8_t  mask 
)

Enable/disable pull up bits on GPIOD.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOD_EnablePullDown ( uint8_t  pos,
bool  bit 
)

Enable/disable pull down on GPIOD.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOD_EnablePullUp ( uint8_t  pos,
bool  bit 
)

Enable/disable pull up on GPIOD.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
uint8_t GPIOD_PortRead ( uint8_t  mask)

Read port value from GPIOD.

Parameters
maskThe bit mask for the pins to be read.
Returns
The masked port value from GPIOD.
void GPIOD_PortSet ( uint8_t  val,
uint8_t  mask 
)

Set port value on GPIOD.

Parameters
valThe value to be set to GPIO port.
maskThe bit mask for the pins to be configured.
Returns
None.
uint8_t GPIOD_Read ( uint8_t  pos)

Read pin state on GPIOD.

Parameters
posThe pin position.
Returns
The pin state.
void GPIOD_Set ( uint8_t  pos,
uint8_t  bit 
)

Set pin state on GPIOD.

Parameters
posThe pin position.
bitThe pin state.
void GPIOE_EnableInput ( uint8_t  pos,
bool  bit 
)

Enable/disable Input on GPIOE.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOE_EnableInterrupt ( uint8_t  pos,
bool  bit 
)

Enable/disable interrupt on GPIOE.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOE_EnableOutput ( uint8_t  pos,
bool  bit 
)

Enable/disable output on GPIOE.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOE_EnablePortInput ( bool  bit,
uint8_t  mask 
)

Enable/disable input enable bits on GPIOE.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOE_EnablePortInterrupt ( bool  bit,
uint8_t  mask 
)

Enable/disable interrupt enable bits on GPIOE.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOE_EnablePortOutput ( bool  bit,
uint8_t  mask 
)

Enable/disable output enable bits on GPIOE.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOE_EnablePortPullDown ( bool  bit,
uint8_t  mask 
)

Enable/disable pull down on GPIOE.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOE_EnablePortPullUp ( bool  bit,
uint8_t  mask 
)

Enable/disable pull up bits on GPIOE.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOE_EnablePullDown ( uint8_t  pos,
bool  bit 
)

Enable/disable pull down on GPIOE.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOE_EnablePullUp ( uint8_t  pos,
bool  bit 
)

Enable/disable pull up on GPIOE.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
uint8_t GPIOE_PortRead ( uint8_t  mask)

Read port value from GPIOE.

Parameters
maskThe bit mask for the pins to be read.
Returns
The masked port value from GPIOE.
void GPIOE_PortSet ( uint8_t  val,
uint8_t  mask 
)

Set port value on GPIOE.

Parameters
valThe value to be set to GPIO port.
maskThe bit mask for the pins to be configured.
Returns
None.
uint8_t GPIOE_Read ( uint8_t  pos)

Read pin state on GPIOE.

Parameters
posThe pin position.
Returns
The pin state.
void GPIOE_Set ( uint8_t  pos,
uint8_t  bit 
)

Set pin state on GPIOE.

Parameters
posThe pin position.
bitThe pin state.
void GPIOF_EnableInput ( uint8_t  pos,
bool  bit 
)

Enable/disable Input on GPIOF.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOF_EnableInterrupt ( uint8_t  pos,
bool  bit 
)

Enable/disable interrupt on GPIOF.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOF_EnableOutput ( uint8_t  pos,
bool  bit 
)

Enable/disable output on GPIOF.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOF_EnablePortInput ( bool  bit,
uint8_t  mask 
)

Enable/disable input enable bits on GPIOF.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOF_EnablePortInterrupt ( bool  bit,
uint8_t  mask 
)

Enable/disable interrupt enable bits on GPIOF.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOF_EnablePortOutput ( bool  bit,
uint8_t  mask 
)

Enable/disable output enable bits on GPIOF.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOF_EnablePortPullDown ( bool  bit,
uint8_t  mask 
)

Enable/disable pull down on GPIOF.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOF_EnablePortPullUp ( bool  bit,
uint8_t  mask 
)

Enable/disable pull up bits on GPIOF.

Parameters
bitThe enable bit, true for enable, false for disable.
maskThe bit mask for the bits to be configured.
Returns
None.
void GPIOF_EnablePullDown ( uint8_t  pos,
bool  bit 
)

Enable/disable pull down on GPIOF.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
void GPIOF_EnablePullUp ( uint8_t  pos,
bool  bit 
)

Enable/disable pull up on GPIOF.

Parameters
posThe pin position.
bitThe enable bit, true for enable, false for disable.
uint8_t GPIOF_PortRead ( uint8_t  mask)

Read port value from GPIOF.

Parameters
maskThe bit mask for the pins to be read.
Returns
The masked port value from GPIOF.
void GPIOF_PortSet ( uint8_t  val,
uint8_t  mask 
)

Set port value on GPIOF.

Parameters
valThe value to be set to GPIO port.
maskThe bit mask for the pins to be configured.
Returns
None.
uint8_t GPIOF_Read ( uint8_t  pos)

Read pin state on GPIOF.

Parameters
posThe pin position.
Returns
The pin state.
void GPIOF_Set ( uint8_t  pos,
uint8_t  bit 
)

Set pin state on GPIOF.

Parameters
posThe pin position.
bitThe pin state.