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

GPIO output handling. More...

#include "sarmfsw.h"
#include "GPIO_out.h"
Include dependency graph for GPIO_out.c:

Functions

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.
 

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

Function Documentation

◆ 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: