HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
Loading...
Searching...
No Matches
GPIO_out.h File Reference

GPIO output handling. More...

#include "sarmfsw.h"
#include "Logic_out.h"
Include dependency graph for GPIO_out.h:
This graph shows which files directly or indirectly include this file:

Typedefs

typedef Logic_out GPIO_out
 GPIO_out typedef alias of Logic_out.
 
typedef eLogic_out_mode eGPIO_out_mode
 eGPIO_out_mode typedef alias of eLogic_out_mode
 

Functions

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.
 

Detailed Description

GPIO output handling.

Author
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

Typedef Documentation

◆ eGPIO_out_mode

eGPIO_out_mode typedef alias of eLogic_out_mode

◆ GPIO_out

GPIO_out typedef alias of Logic_out.

Function Documentation

◆ get_GPIO_out_Idle()

bool get_GPIO_out_Idle ( const GPIO_out *const out)
inline

Get GPIO_out current status.

Parameters
[in]out- GPIO_out instance
Returns
Pin status
Here is the call graph for this function:

◆ get_GPIO_out_Mode()

eGPIO_out_mode get_GPIO_out_Mode ( const GPIO_out *const out)
inline

Get GPIO_out current mode.

Parameters
[in]out- GPIO_out instance
Returns
Pin mode
Here is the call graph for this function:

◆ get_GPIO_out_State()

eGPIOState get_GPIO_out_State ( const GPIO_out *const out)
inline

Get GPIO_out current output value.

Parameters
[in]out- GPIO_out instance
Returns
Pin state
Here is the call graph for this function:

◆ 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
[in,out]out- GPIO_out instance
Returns
FctERR - Error code
Here is the call graph for this function:

◆ GPIO_out_handler()

void GPIO_out_handler ( GPIO_out *const out)
inline

Handles GPIO_out treatment.

Parameters
[in,out]out- GPIO_out instance to handle
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

◆ GPIO_out_Reset()

FctERR GPIO_out_Reset ( GPIO_out *const out)
inline

Reset GPIO_out.

Parameters
[in,out]out- GPIO_out instance
Returns
FctERR - Error Code
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

◆ GPIO_out_Set()

FctERR GPIO_out_Set ( GPIO_out *const out)
inline

Set GPIO_out.

Parameters
[in,out]out- GPIO_out instance
Returns
FctERR - Error Code
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

◆ 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
Here is the call graph for this function: