CubeMon-Vue-Demo-STM32F407VGT6U
do.h
Go to the documentation of this file.
1
21#ifndef INC_DO_DO_H_
22#define INC_DO_DO_H_
23
25#include <lib/uti/lib_config.h>
26#include <lib/uti/utility.h>
27
28#ifdef LIB_DO
29#include <prog/init.h>
30#else
35typedef enum digOutputs {
36 DO_NONE,
38#endif
39
40typedef struct digitalOutputInitData {
41 uint16_t pin;
42 GPIO_TypeDef *port;
43 GPIO_PinState init_state; //<
45
55 digitalOutputInitData digital_output_init_data);
56
64
73retStatus output_set(digOutputs output_name, GPIO_PinState state);
74
83
91__weak retStatus output_set_hw_HAL(digOutputs output_name, GPIO_PinState state);
92
93#endif /* INC_DO_DO_H_ */
retStatus output_init(digOutputs output, digitalOutputInitData digital_output_init_data)
Digital output initialization function.
Definition: do.c:19
retStatus output_toggle(digOutputs output)
Toggles the output state.
Definition: do.c:50
dioStates output_get_state(digOutputs output)
Get the current output state.
Definition: do.c:80
__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)
Definition: do.c:90
digOutputs
Definition: do.h:35
retStatus output_set(digOutputs output_name, GPIO_PinState state)
Sets output state.
Definition: do.c:65
provides HAL includes for different MCU cores
Initialization of digital/analog inputs and outputs.
@ DO_NONE
DUMMY to keep the track of enum length.
Definition: init.h:30
Defines for turning on/off the library modules.
Definition: do.h:40
GPIO_TypeDef * port
MCU GPIO port.
Definition: do.h:42
uint16_t pin
MCU GPIO pin number.
Definition: do.h:41
Defines and functions that are useful for all library files.
dioStates
digital input/output states
Definition: utility.h:31
retStatus
possible return values
Definition: utility.h:13