Public functions.
More...
|
void | ketCube_GPIO_InitDriver (void) |
| Initializes the GPIO driver. More...
|
|
ketCube_cfg_DrvError_t | ketCube_GPIO_SleepEnter (void) |
| Set-UP GPIO befere sleep enter. More...
|
|
ketCube_cfg_DrvError_t | ketCube_GPIO_Init (ketCube_gpio_port_t port, uint16_t pin, GPIO_InitTypeDef *initStruct) |
| Initializes the GPIO PIN(s) More...
|
|
ketCube_cfg_DrvError_t | ketCube_GPIO_InitLED (ketCube_gpio_port_t port, uint16_t pin, ketCube_gpio_polarity_t polarity) |
| Initializes the GPIO PIN(s) as LEDs. More...
|
|
ketCube_cfg_DrvError_t | ketCube_GPIO_ReInit (ketCube_gpio_port_t port, uint16_t pin, GPIO_InitTypeDef *initStruct) |
| Initializes the GPIO PIN(s) without usage checking. More...
|
|
ketCube_cfg_DrvError_t | ketCube_GPIO_Release (ketCube_gpio_port_t port, ketCube_gpio_pin_t pin) |
| Release KETCube PIN - setup as input pin. More...
|
|
ketCube_cfg_DrvError_t | ketCube_GPIO_SetIrq (ketCube_gpio_port_t port, ketCube_gpio_pin_t pin, uint32_t prio, ketCube_GPIO_VoidFn_t irqHandler) |
| Records the interrupt handler for the GPIO object. More...
|
|
ketCube_cfg_DrvError_t | ketCube_GPIO_ClearIrq (ketCube_gpio_port_t port, ketCube_gpio_pin_t pin) |
| Clear IRQ for the GPIO object. More...
|
|
void | ketCube_GPIO_Write (ketCube_gpio_port_t port, ketCube_gpio_pin_t pin, bool bit) |
| Writes the bit value to the GPIO PIN. More...
|
|
bool | ketCube_GPIO_Read (ketCube_gpio_port_t port, ketCube_gpio_pin_t pin) |
| Reads the current PIN value. More...
|
|
void | ketCube_GPIO_SetLED (ketCube_gpio_port_t port, ketCube_gpio_pin_t pin, ketCube_gpio_LEDState_t state) |
| Sets the LED state. More...
|
|
void | EXTI0_1_IRQHandler (void) |
|
void | EXTI2_3_IRQHandler (void) |
|
void | EXTI4_15_IRQHandler (void) |
|
Public functions.
◆ EXTI0_1_IRQHandler()
void EXTI0_1_IRQHandler |
( |
void |
| ) |
|
◆ EXTI2_3_IRQHandler()
void EXTI2_3_IRQHandler |
( |
void |
| ) |
|
◆ EXTI4_15_IRQHandler()
void EXTI4_15_IRQHandler |
( |
void |
| ) |
|
◆ ketCube_GPIO_ClearIrq()
Clear IRQ for the GPIO object.
- Parameters
-
port | GPIO port |
pin | GPIO PIN |
- Return values
-
KETCUBE_CFG_DRV_OK | in case of success |
KETCUBE_CFG_DRV_ERROR | in case of failure |
◆ ketCube_GPIO_Init()
Initializes the GPIO PIN(s)
- Parameters
-
port | GPIO port |
pin | GPIO PIN |
initStruct | GPIO_InitTypeDef intit structure |
- Return values
-
KETCUBE_CFG_DRV_OK | in case of success |
KETCUBE_CFG_DRV_ERROR | in case of failure |
◆ ketCube_GPIO_InitDriver()
void ketCube_GPIO_InitDriver |
( |
void |
| ) |
|
Initializes the GPIO driver.
- Note
- this sets all PINs into initial state
◆ ketCube_GPIO_InitLED()
Initializes the GPIO PIN(s) as LEDs.
- Parameters
-
port | GPIO port |
pin | GPIO PIN |
polarity | LED PIN ON polarity - set to TRUE if LED is ON when output is 1 |
- Return values
-
KETCUBE_CFG_DRV_OK | in case of success |
KETCUBE_CFG_DRV_ERROR | in case of failure |
◆ ketCube_GPIO_Read()
Reads the current PIN value.
- Parameters
-
port | GPIO port |
pin | GPIO PIN |
- Return values
-
bit | TRUE if PIN value is '1', else return FALSE |
◆ ketCube_GPIO_ReInit()
Initializes the GPIO PIN(s) without usage checking.
- Parameters
-
port | GPIO port |
pin | GPIO PIN |
initStruct | GPIO_InitTypeDef intit structure |
- Return values
-
KETCUBE_CFG_DRV_OK | in case of success |
KETCUBE_CFG_DRV_ERROR | in case of failure |
◆ ketCube_GPIO_Release()
Release KETCube PIN - setup as input pin.
This can help in low-power modes to avoid leakage when uart pin(s) drive(s) something.
- Parameters
-
port | KETCube port |
pin | KETCube pin |
- Return values
-
KETCUBE_CFG_DRV_OK | in case of success |
KETCUBE_CFG_DRV_ERROR | in case of failure |
◆ ketCube_GPIO_SetIrq()
Records the interrupt handler for the GPIO object.
- Parameters
-
port | GPIO port |
pin | GPIO PIN |
prio | NVIC priority (0 is highest) |
irqHandler | pointer to handling function |
- Return values
-
KETCUBE_CFG_DRV_OK | in case of success |
KETCUBE_CFG_DRV_ERROR | in case of failure |
◆ ketCube_GPIO_SetLED()
Sets the LED state.
- Note
- pin must be initialized as LED pin (
- See also
- ketCube_GPIO_InitLED) prior calling this function - otherwise this function has no effect
- Parameters
-
port | GPIO port |
pin | GPIO PIN |
state | set LED state |
- See also
- ketCube_gpio_LEDState_t
◆ ketCube_GPIO_SleepEnter()
Set-UP GPIO befere sleep enter.
Set unused GPIO PINs to analog – this should be set by ketCube_GPIO_Release()
- Note
- This function should be called by KETCube core
◆ ketCube_GPIO_Write()
Writes the bit value to the GPIO PIN.
- Parameters
-
port | GPIO port |
pin | GPIO PIN |
bit | TRUE if PIN value is '1', else return FALSE |