Kamcho Library 02.00.03
lib.kamcho.02.00.03.287
|
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | GPIO_SFRS_t |
A structure to represent Special Function Registers for all GPIO block. More... | |
struct | GPIOA_SFRS_t |
A structure to represent Special Function Registers for GPIOA block. More... | |
struct | GPIOB_SFRS_t |
A structure to represent Special Function Registers for GPIOB. More... | |
struct | GPIOC_SFRS_t |
A structure to represent Special Function Registers for GPIOC. More... | |
struct | GPIOD_SFRS_t |
A structure to represent Special Function Registers for GPIOD. More... | |
struct | GPIOE_SFRS_t |
A structure to represent Special Function Registers for GPIOE. More... | |
Macros | |
#define | GPIO_SFRS ((__IO GPIO_SFRS_t *) (ASIC_7B_BASE + 0x60)) |
The starting address of all GPIO block. More... | |
#define | GPIOA_SFRS ((__IO GPIOA_SFRS_t *)(ASIC_7B_BASE + 0x60)) |
The starting address of GPIOA block. More... | |
#define | GPIOB_SFRS ((__IO GPIOB_SFRS_t *) (ASIC_7B_BASE + 0x61)) |
The starting address of GPIOB block. More... | |
#define | GPIOC_SFRS ((__IO GPIOC_SFRS_t *) (ASIC_7B_BASE + 0x62)) |
The starting address of GPIOC block. More... | |
#define | GPIOD_SFRS ((__IO GPIOD_SFRS_t *) (ASIC_7B_BASE + 0x63)) |
The starting address of GPIOD block. More... | |
#define | GPIOE_SFRS ((__IO GPIOE_SFRS_t *) (ASIC_7B_BASE + 0x64)) |
The starting address of GPIOE block. More... | |
#define | E_GPIO_I2C_PULLIP_OPEN 0 |
#define | E_GPIO_I2C_PULLIP_1K 1 |
#define | E_GPIO_I2C_PULLIP_10K 2 |
#define | E_GPIO_I2C_PULLIP_100K 3 |
#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 |
Typedefs | |
typedef struct GPIO_SFRS_t | GPIO_SFRS_t |
A structure to represent Special Function Registers for all GPIO block. More... | |
Functions | |
static __INLINE void | GPIOA_EnablePullUp (uint8_t pos, bool bit) |
Enable/disable pull up on GPIOA. More... | |
static __INLINE void | GPIOA_EnablePullDown (uint8_t pos, bool bit) |
Enable/disable pull down on GPIOA. More... | |
static __INLINE void | GPIOA_EnableOutput (uint8_t pos, bool bit) |
Enable/disable output on GPIOA. More... | |
static __INLINE void | GPIOA_EnableInput (uint8_t pos, bool bit) |
Enable/disable input on GPIOA. More... | |
static __INLINE void | GPIOA_EnableInterrupt (uint8_t pos, bool bit) |
Enable/disable interrupt on GPIOA. More... | |
static __INLINE uint8_t | GPIOA_Read (uint8_t pos) |
Read pin state on GPIOA. More... | |
static __INLINE void | GPIOA_Set (uint8_t pos, uint8_t bit) |
Set pin state on GPIOA. More... | |
static __INLINE void | GPIOA_EnablePortPullUp (bool bit, uint8_t mask) |
Enable/disable pull up bits on GPIOA. More... | |
static __INLINE void | GPIOA_EnablePortPullDown (bool bit, uint8_t mask) |
Enable/disable pull down on GPIOA. More... | |
static __INLINE void | GPIOA_EnablePortOutput (bool bit, uint8_t mask) |
Enable/disable output enable bits on GPIOA. More... | |
static __INLINE void | GPIOA_EnablePortInput (bool bit, uint8_t mask) |
Enable/disable input enable bits on GPIOA. More... | |
static __INLINE void | GPIOA_EnablePortInterrupt (bool bit, uint8_t mask) |
Enable/disable interrupt enable bits on GPIOA. More... | |
static __INLINE void | GPIOA_PortSet (uint8_t val, uint8_t mask) |
Set port value on GPIOA. More... | |
static __INLINE uint8_t | GPIOA_PortRead (uint8_t mask) |
Read port value from GPIOA. More... | |
static __INLINE void | GPIOB_EnablePullUp (uint8_t pos, bool bit) |
Enable/disable pull up on GPIOB. More... | |
static __INLINE void | GPIOB_EnablePullDown (uint8_t pos, bool bit) |
Enable/disable pull down on GPIOB. More... | |
static __INLINE void | GPIOB_EnableOutput (uint8_t pos, bool bit) |
Enable/disable output on GPIOB. More... | |
static __INLINE void | GPIOB_EnableInput (uint8_t pos, bool bit) |
Enable/disable Input on GPIOB. More... | |
static __INLINE void | GPIOB_EnableInterrupt (uint8_t pos, bool bit) |
Enable/disable interrupt on GPIOA. More... | |
static __INLINE uint8_t | GPIOB_Read (uint8_t pos) |
Read pin state on GPIOB. More... | |
static __INLINE void | GPIOB_Set (uint8_t pos, uint8_t bit) |
Set pin state on GPIOB. More... | |
static __INLINE void | GPIOB_EnablePortPullUp (bool bit, uint8_t mask) |
Enable/disable pull up bits on GPIOB. More... | |
static __INLINE void | GPIOB_EnablePortPullDown (bool bit, uint8_t mask) |
Enable/disable pull down enable bits on GPIOB. More... | |
static __INLINE void | GPIOB_EnablePortOutput (bool bit, uint8_t mask) |
Enable/disable output enable bits on GPIOB. More... | |
static __INLINE void | GPIOB_EnablePortInput (bool bit, uint8_t mask) |
Enable/disable input enable bits on GPIOB. More... | |
static __INLINE void | GPIOB_EnablePortInterrupt (bool bit, uint8_t mask) |
Enable/disable interrupt enable bits on GPIOB. More... | |
static __INLINE void | GPIOB_PortSet (uint8_t val, uint8_t mask) |
Set port value on GPIOB. More... | |
static __INLINE uint8_t | GPIOB_PortRead (uint8_t mask) |
Read port value from GPIOB. More... | |
static __INLINE void | GPIOC_EnablePullUp (uint8_t pos, bool bit) |
Enable/disable pull up on GPIOC. More... | |
static __INLINE void | GPIOC_EnablePullDown (uint8_t pos, bool bit) |
Enable/disable pull down on GPIOC. More... | |
static __INLINE void | GPIOC_EnableOutput (uint8_t pos, bool bit) |
Enable/disable output on GPIOC. More... | |
static __INLINE void | GPIOC_EnableInput (uint8_t pos, bool bit) |
Enable/disable Input on GPIOC. More... | |
static __INLINE uint8_t | GPIOC_Read (uint8_t pos) |
Read pin state on GPIOC. More... | |
static __INLINE void | GPIOC_Set (uint8_t pos, uint8_t bit) |
Set pin state on GPIOC. More... | |
static __INLINE void | GPIOC_EnablePortPullUp (bool bit, uint8_t mask) |
Enable/disable pull up bits on GPIOC. More... | |
static __INLINE void | GPIOC_EnablePortPullDown (bool bit, uint8_t mask) |
Enable/disable pull down on GPIOC. More... | |
static __INLINE void | GPIOC_EnablePortOutput (bool bit, uint8_t mask) |
Enable/disable output enable bits on GPIOC. More... | |
static __INLINE void | GPIOC_EnablePortInput (bool bit, uint8_t mask) |
Enable/disable input enable bits on GPIOC. More... | |
static __INLINE void | GPIOC_PortSet (uint8_t val, uint8_t mask) |
Set port value on GPIOC. More... | |
static __INLINE uint8_t | GPIOC_PortRead (uint8_t mask) |
Read port value from GPIOC. More... | |
static __INLINE void | GPIOD_EnablePullUp (uint8_t pos, bool bit) |
Enable/disable pull up on GPIOD. More... | |
static __INLINE void | GPIOD_EnablePullDown (uint8_t pos, bool bit) |
Enable/disable pull down on GPIOD. More... | |
static __INLINE void | GPIOD_EnableOutput (uint8_t pos, bool bit) |
Enable/disable output on GPIOD. More... | |
static __INLINE void | GPIOD_EnableInput (uint8_t pos, bool bit) |
Enable/disable Input on GPIOD. More... | |
static __INLINE void | GPIOD_EnableInterrupt (uint8_t pos, bool bit) |
Enable/disable interrupt on GPIOD. More... | |
static __INLINE uint8_t | GPIOD_Read (uint8_t pos) |
Read pin state on GPIOD. More... | |
static __INLINE void | GPIOD_Set (uint8_t pos, uint8_t bit) |
Set pin state on GPIOD. More... | |
static __INLINE void | GPIOD_EnablePortPullUp (bool bit, uint8_t mask) |
Enable/disable pull up bits on GPIOD. More... | |
static __INLINE void | GPIOD_EnablePortPullDown (bool bit, uint8_t mask) |
Enable/disable pull down on GPIOD. More... | |
static __INLINE void | GPIOD_EnablePortOutput (bool bit, uint8_t mask) |
Enable/disable output enable bits on GPIOD. More... | |
static __INLINE void | GPIOD_EnablePortInput (bool bit, uint8_t mask) |
Enable/disable input enable bits on GPIOD. More... | |
static __INLINE void | GPIOD_EnablePortInterrupt (bool bit, uint8_t mask) |
Enable/disable interrupt enable bits on GPIOD. More... | |
static __INLINE void | GPIOD_PortSet (uint8_t val, uint8_t mask) |
Set port value on GPIOD. More... | |
static __INLINE uint8_t | GPIOD_PortRead (uint8_t mask) |
Read port value from GPIOD. More... | |
static __INLINE void | GPIOE_EnablePullUp (uint8_t pos, bool bit) |
Enable/disable pull up on GPIOE. More... | |
static __INLINE void | GPIOE_EnablePullDown (uint8_t pos, bool bit) |
Enable/disable pull down on GPIOE. More... | |
static __INLINE void | GPIOE_EnableOutput (uint8_t pos, bool bit) |
Enable/disable output on GPIOE. More... | |
static __INLINE void | GPIOE_EnableInput (uint8_t pos, bool bit) |
Enable/disable Input on GPIOE. More... | |
static __INLINE uint8_t | GPIOE_Read (uint8_t pos) |
Read pin state on GPIOE. More... | |
static __INLINE void | GPIOE_Set (uint8_t pos, uint8_t bit) |
Set pin state on GPIOE. More... | |
static __INLINE void | GPIOE_EnablePortPullUp (bool bit, uint8_t mask) |
Enable/disable pull up bits on GPIOE. More... | |
static __INLINE void | GPIOE_EnablePortPullDown (bool bit, uint8_t mask) |
Enable/disable pull down bits on GPIOE. More... | |
static __INLINE void | GPIOE_EnablePortOutput (bool bit, uint8_t mask) |
Enable/disable output enable bits on GPIOE. More... | |
static __INLINE void | GPIOE_EnablePortInput (bool bit, uint8_t mask) |
Enable/disable input enable bits on GPIOE. More... | |
static __INLINE void | GPIOE_PortSet (uint8_t val, uint8_t mask) |
Set port value on GPIOE. More... | |
static __INLINE uint8_t | GPIOE_PortRead (uint8_t mask) |
Read port value from GPIOE. More... | |
static __INLINE void | GPIO_ConfigI2C (uint8_t mode, uint8_t pu) |
Config GPIO pin to I2C mode. More... | |
static __INLINE void | GPIO_ConfigUART (uint8_t mode, uint8_t swap, uint8_t invert) |
Config GPIO pin to UART mode. More... | |
static __INLINE void | GPIO_ConfigSPI (uint8_t mode) |
Config GPIO pin to SPI mode. More... | |
static __INLINE void | GPIO_ConfigSetModePWM1 (uint8_t pos) |
Config GPIO pin to PWM1. More... | |
static __INLINE void | GPIO_ConfigClrModePWM1 (uint8_t pos) |
Set PWM1 back to GPIO mode. More... | |
static __INLINE void | GPIO_ConfigSetModePWM2 (uint8_t pos) |
Config GPIO pin to PWM2. More... | |
static __INLINE void | GPIO_ConfigClrModePWM2 (uint8_t pos) |
Set PWM2 back to GPIO mode. More... | |
static __INLINE void | GPIO_ConfigSetModeLED (uint8_t pos) |
Set GPIO to LED pin. More... | |
static __INLINE void | GPIO_ConfigClrModeLED (uint8_t pos) |
Set LED pin back to GPIO. 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_I2C_PULLIP_100K 3 |
#define E_GPIO_I2C_PULLIP_10K 2 |
#define E_GPIO_I2C_PULLIP_1K 1 |
#define E_GPIO_I2C_PULLIP_OPEN 0 |
#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 GPIO_SFRS ((__IO GPIO_SFRS_t *) (ASIC_7B_BASE + 0x60)) |
The starting address of all GPIO block.
#define GPIOA_SFRS ((__IO GPIOA_SFRS_t *)(ASIC_7B_BASE + 0x60)) |
The starting address of GPIOA block.
#define GPIOB_SFRS ((__IO GPIOB_SFRS_t *) (ASIC_7B_BASE + 0x61)) |
The starting address of GPIOB block.
#define GPIOC_SFRS ((__IO GPIOC_SFRS_t *) (ASIC_7B_BASE + 0x62)) |
The starting address of GPIOC block.
#define GPIOD_SFRS ((__IO GPIOD_SFRS_t *) (ASIC_7B_BASE + 0x63)) |
The starting address of GPIOD block.
#define GPIOE_SFRS ((__IO GPIOE_SFRS_t *) (ASIC_7B_BASE + 0x64)) |
The starting address of GPIOE block.
typedef struct GPIO_SFRS_t GPIO_SFRS_t |
A structure to represent Special Function Registers for all GPIO block.
|
static |
Set LED pin back to GPIO.
pos | GPIO pin position. |
|
static |
Set PWM1 back to GPIO mode.
pos | GPIO pin position. |
|
static |
Set PWM2 back to GPIO mode.
pos | GPIO pin position. |
|
static |
Config GPIO pin to I2C mode.
mode | GPIO mode or non GPIO mode (I2C mode). |
pu | The pull up settings. |
|
static |
Set GPIO to LED pin.
pos | GPIO pin position. |
|
static |
Config GPIO pin to PWM1.
pos | GPIO pin position. |
|
static |
Config GPIO pin to PWM2.
pos | GPIO pin position. |
|
static |
Config GPIO pin to SPI mode.
mode | GPIO mode or non GPIO mode (SPI mode). |
|
static |
Config GPIO pin to UART mode.
mode | GPIO mode or non GPIO mode (UART mode). |
swap | The pin swap setting. |
invert | The polarity setting. |
|
static |
Enable/disable input on GPIOA.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable interrupt on GPIOA.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable output on GPIOA.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable input enable bits on GPIOA.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable interrupt enable bits on GPIOA.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable output enable bits on GPIOA.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable pull down on GPIOA.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable pull up bits on GPIOA.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable pull down on GPIOA.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable pull up on GPIOA.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Read port value from GPIOA.
mask | The bit mask for the pins to be read. |
|
static |
Set port value on GPIOA.
val | The value to be set to GPIO port. |
mask | The bit mask for the pins to be configured. |
|
static |
Read pin state on GPIOA.
pos | The pin position. |
|
static |
Set pin state on GPIOA.
pos | The pin position. |
bit | The pin state. |
|
static |
Enable/disable Input on GPIOB.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable interrupt on GPIOA.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable output on GPIOB.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable input enable bits on GPIOB.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable interrupt enable bits on GPIOB.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable output enable bits on GPIOB.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable pull down enable bits on GPIOB.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable pull up bits on GPIOB.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable pull down on GPIOB.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable pull up on GPIOB.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Read port value from GPIOB.
mask | The bit mask for the pins to be read. |
|
static |
Set port value on GPIOB.
val | The value to be set to GPIO port. |
mask | The bit mask for the pins to be configured. |
|
static |
Read pin state on GPIOB.
pos | The pin position. |
|
static |
Set pin state on GPIOB.
pos | The pin position. |
bit | The pin state. |
|
static |
Enable/disable Input on GPIOC.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable output on GPIOC.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable input enable bits on GPIOC.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable output enable bits on GPIOC.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable pull down on GPIOC.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable pull up bits on GPIOC.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
Enable/disable pull down on GPIOC.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable pull up on GPIOC.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Read port value from GPIOC.
mask | The bit mask for the pins to be read. |
|
static |
Set port value on GPIOC.
val | The value to be set to GPIO port. |
mask | The bit mask for the pins to be configured. |
|
static |
Read pin state on GPIOC.
pos | The pin position. |
|
static |
Set pin state on GPIOC.
pos | The pin position. |
bit | The pin state. |
|
static |
Enable/disable Input on GPIOD.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable interrupt on GPIOD.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable output on GPIOD.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
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. |
|
static |
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. |
|
static |
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. |
|
static |
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. |
|
static |
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. |
|
static |
Enable/disable pull down on GPIOD.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable pull up on GPIOD.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Read port value from GPIOD.
mask | The bit mask for the pins to be read. |
|
static |
Set port value on GPIOD.
val | The value to be set to GPIO port. |
mask | The bit mask for the pins to be configured. |
|
static |
Read pin state on GPIOD.
pos | The pin position. |
|
static |
Set pin state on GPIOD.
pos | The pin position. |
bit | The pin state. |
|
static |
Enable/disable Input on GPIOE.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable output on GPIOE.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
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. |
|
static |
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. |
|
static |
Enable/disable pull down bits on GPIOE.
bit | The enable bit, true for enable, false for disable. |
mask | The bit mask for the bits to be configured. |
|
static |
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. |
|
static |
Enable/disable pull down on GPIOE.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Enable/disable pull up on GPIOE.
pos | The pin position. |
bit | The enable bit, true for enable, false for disable. |
|
static |
Read port value from GPIOE.
mask | The bit mask for the pins to be read. |
|
static |
Set port value on GPIOE.
val | The value to be set to GPIO port. |
mask | The bit mask for the pins to be configured. |
|
static |
Read pin state on GPIOE.
pos | The pin position. |
|
static |
Set pin state on GPIOE.
pos | The pin position. |
bit | The pin state. |