CubeMon-Vue-Demo-STM32F407VGT6U
do.c File Reference

digital outputs with set/get and toggle functions More...

#include <lib/do.h>
#include <lib/uti/swo.h>

Data Structures

struct  digitalOutputDef
 

Typedefs

typedef struct digitalOutputDef digitalOutputDef
 

Functions

retStatus output_init (digOutputs output_name, digitalOutputInitData digital_output_init_data)
 Digital output initialization function. More...
 
retStatus output_toggle (digOutputs output_name)
 Toggles the output state. More...
 
retStatus output_set (digOutputs output_name, GPIO_PinState state)
 Sets output state. More...
 
dioStates output_get_state (digOutputs output_name)
 Get the current output state. More...
 
__weak retStatus output_set_hw_HAL (digOutputs output_name, GPIO_PinState state)
 Sets HW output state. In case you want to implement it differently (f.e. not using HAL) More...
 

Detailed Description

digital outputs with set/get and toggle functions

Author
panvicka
Date
8.1.2022

Function Documentation

◆ output_get_state()

dioStates output_get_state ( digOutputs  output)

Get the current output state.

Parameters
[in]outputoutput identification, defined by digOutputs
Returns
DIO_NOT_INITIALIZED ENODEV if the /p output is out of range defined by digOutputs or is not initialized DIO_OFF if output is in off state DIO_ON if output is in on state

◆ output_init()

retStatus output_init ( digOutputs  output,
digitalOutputInitData  digital_output_init_data 
)

Digital output initialization function.

Parameters
[in]outputoutput identification, defined by digOutputs
[in]digital_output_init_dataoutput initialization data digitalOutputInitData
Returns
EOK is the initialization completed OK ENODEV if the /p output is out of range defined by digOutputs or there are invalid values in the initialization struct

◆ output_set()

retStatus output_set ( digOutputs  output_name,
GPIO_PinState  state 
)

Sets output state.

Parameters
[in]output_nameoutput identification, defined by digOutputs
[in]statestate to be set
Returns
EOK action completed ENODEV if the /p output is out of range defined by digOutputs or is not initialized

◆ output_set_hw_HAL()

__weak retStatus output_set_hw_HAL ( digOutputs  output_name,
GPIO_PinState  state 
)

Sets HW output state. In case you want to implement it differently (f.e. not using HAL)

Parameters
[in]output_nameoutput identification, defined by digOutputs
[in]statestate to be set
Returns
ENODEV if if the /p output is out of range defined by digOutputs or is not initialized EOK if the output was set OK

◆ output_toggle()

retStatus output_toggle ( digOutputs  output)

Toggles the output state.

Parameters
[in]outputoutput identification, defined by digOutputs
Returns
EOK action completed ENODEV if the /p output is out of range defined by digOutputs or is not initialized