GPIO output handling.
More...
#include "sarmfsw.h"
#include "Logic_out.h"
|
| eGPIOState | get_GPIO_out_State (const GPIO_out *const out) |
| | Get GPIO_out current output value.
|
| |
| eGPIO_out_mode | get_GPIO_out_Mode (const GPIO_out *const out) |
| | Get GPIO_out current mode.
|
| |
| bool | get_GPIO_out_Idle (const GPIO_out *const out) |
| | Get GPIO_out current status.
|
| |
| FctERR | GPIO_out_init (GPIO_out *const out, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState polarity) |
| | Initialize GPIO_out instance.
|
| |
| FctERR | GPIO_out_Abort (GPIO_out *const out) |
| | Stop GPIO_out pulse/blink if running, or abort set if delay not reached.
|
| |
| FctERR | GPIO_out_SetStatic (GPIO_out *const out, const eGPIOState action, const uint32_t delay) |
| | Set GPIO_out state.
|
| |
| FctERR | GPIO_out_Set (GPIO_out *const out) |
| | Set GPIO_out.
|
| |
| FctERR | GPIO_out_Set_Delayed (GPIO_out *const out, const uint32_t delay) |
| | Set GPIO_out.
|
| |
| FctERR | GPIO_out_Reset (GPIO_out *const out) |
| | Reset GPIO_out.
|
| |
| FctERR | GPIO_out_Reset_Delayed (GPIO_out *const out, const uint32_t delay) |
| | Reset GPIO_out.
|
| |
| FctERR | GPIO_out_StartPulse (GPIO_out *const out, const eGPIOState action, const uint32_t delay, const uint32_t active) |
| | Start GPIO_out Pulse.
|
| |
| FctERR | GPIO_out_StartBlink (GPIO_out *const out, const eGPIOState action, const uint32_t delay, const uint32_t active, const uint32_t inactive, const uint32_t count) |
| | Start GPIO_out Blink.
|
| |
| void | GPIO_out_handler (GPIO_out *const out) |
| | Handles GPIO_out treatment.
|
| |
GPIO output handling.
- Author
- SMFSW
- Copyright
- MIT (c) 2017-2026, SMFSW
- Note
- Define
LOGIC_OUT_IT shared symbol at project level to use GPIO_out from timer interrupts (for more timing precision if required)
-
When using GPIO_out from interrupts, shared
LOGIC_OUT_IT_PER period is defined by default with a period of 1000µs (can be customly defined)
- Warning
- Logic_out & GPIO_out shares interrupt behavior, thus needs to be implemented the same way (it or loop) if both are used at the same time
◆ eGPIO_out_mode
◆ GPIO_out
◆ get_GPIO_out_Idle()
| bool get_GPIO_out_Idle |
( |
const GPIO_out *const | out | ) |
|
|
inline |
Get GPIO_out current status.
- Parameters
-
- Returns
- Pin status
◆ get_GPIO_out_Mode()
Get GPIO_out current mode.
- Parameters
-
- Returns
- Pin mode
◆ get_GPIO_out_State()
| eGPIOState get_GPIO_out_State |
( |
const GPIO_out *const | out | ) |
|
|
inline |
Get GPIO_out current output value.
- Parameters
-
- Returns
- Pin state
◆ GPIO_out_Abort()
| FctERR GPIO_out_Abort |
( |
GPIO_out *const | out | ) |
|
|
inline |
Stop GPIO_out pulse/blink if running, or abort set if delay not reached.
- Parameters
-
- Returns
- FctERR - Error code
◆ GPIO_out_handler()
| void GPIO_out_handler |
( |
GPIO_out *const | out | ) |
|
|
inline |
◆ GPIO_out_init()
| FctERR GPIO_out_init |
( |
GPIO_out *const | out, |
|
|
GPIO_TypeDef *const | GPIOx, |
|
|
const uint16_t | GPIO_Pin, |
|
|
const GPIO_PinState | polarity ) |
Initialize GPIO_out instance.
- Parameters
-
| [in,out] | out | - GPIO_out instance to initialize |
| [in] | GPIOx | - port to write to |
| [in] | GPIO_Pin | - pin to write to |
| [in] | polarity | - set to GPIO_PIN_RESET if active state is GND, GPIO_PIN_SET if Vdd |
- Returns
- FctERR - Error code
◆ GPIO_out_Reset()
| FctERR GPIO_out_Reset |
( |
GPIO_out *const | out | ) |
|
|
inline |
Reset GPIO_out.
- Parameters
-
- Returns
- FctERR - Error Code
◆ GPIO_out_Reset_Delayed()
| FctERR GPIO_out_Reset_Delayed |
( |
GPIO_out *const | out, |
|
|
const uint32_t | delay ) |
|
inline |
Reset GPIO_out.
- Parameters
-
| [in,out] | out | - GPIO_out instance |
| [in] | delay | - delay before writing to port (in ms) |
- Returns
- FctERR - Error Code
◆ GPIO_out_Set()
| FctERR GPIO_out_Set |
( |
GPIO_out *const | out | ) |
|
|
inline |
Set GPIO_out.
- Parameters
-
- Returns
- FctERR - Error Code
◆ GPIO_out_Set_Delayed()
| FctERR GPIO_out_Set_Delayed |
( |
GPIO_out *const | out, |
|
|
const uint32_t | delay ) |
|
inline |
Set GPIO_out.
- Parameters
-
| [in,out] | out | - GPIO_out instance |
| [in] | delay | - delay before writing to port (in ms) |
- Returns
- FctERR - Error Code
◆ GPIO_out_SetStatic()
| FctERR GPIO_out_SetStatic |
( |
GPIO_out *const | out, |
|
|
const eGPIOState | action, |
|
|
const uint32_t | delay ) |
|
inline |
Set GPIO_out state.
- Parameters
-
| [in,out] | out | - GPIO_out instance |
| [in] | action | - action to perform on output port pin (Reset/Set/Toggle) |
| [in] | delay | - delay before writing to port (in ms) |
- Returns
- FctERR - Error code
◆ GPIO_out_StartBlink()
| FctERR GPIO_out_StartBlink |
( |
GPIO_out *const | out, |
|
|
const eGPIOState | action, |
|
|
const uint32_t | delay, |
|
|
const uint32_t | active, |
|
|
const uint32_t | inactive, |
|
|
const uint32_t | count ) |
|
inline |
Start GPIO_out Blink.
- Parameters
-
| [in,out] | out | - GPIO_out instance |
| [in] | action | - action to perform on output port pin for active state (Reset/Set/Toggle) |
| [in] | delay | - delay before pulse (in ms) |
| [in] | active | - blink active time (in ms) |
| [in] | inactive | - blink inactive time (in ms) |
| [in] | count | - blink count (0 for infinite) |
- Returns
- FctERR - Error code
◆ GPIO_out_StartPulse()
| FctERR GPIO_out_StartPulse |
( |
GPIO_out *const | out, |
|
|
const eGPIOState | action, |
|
|
const uint32_t | delay, |
|
|
const uint32_t | active ) |
|
inline |
Start GPIO_out Pulse.
- Parameters
-
| [in,out] | out | - GPIO_out instance |
| [in] | action | - action to perform on output port pin for active state (Reset/Set/Toggle) |
| [in] | delay | - delay before pulse (in ms) |
| [in] | active | - pulse time (in ms) |
- Returns
- FctERR - Error code