InES Hardware Abstraction Layer
hal_dac.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * -- _____ ______ _____ -
3  * -- |_ _| | ____|/ ____| -
4  * -- | | _ __ | |__ | (___ Institute of Embedded Systems -
5  * -- | | | '_ \| __| \___ \ Zurich University of -
6  * -- _| |_| | | | |____ ____) | Applied Sciences -
7  * -- |_____|_| |_|______|_____/ 8401 Winterthur, Switzerland -
8  * ------------------------------------------------------------------------- */
18 /* Re-definition guard */
19 #ifndef _HAL_DAC_H
20 #define _HAL_DAC_H
21 
22 
23 /* User includes */
24 #include "reg_stm32f4xx.h"
25 #include "hal_common.h"
26 
27 
28 /* -- Type definitions
29  * ------------------------------------------------------------------------- */
30 
35 typedef enum {
36  HAL_DAC_CH1 = 0u,
37  HAL_DAC_CH2 = 16u,
39 
40 
45 typedef enum {
55 
60 typedef struct {
65 
66 
67 /* -- Public function declarations
68  * ------------------------------------------------------------------------- */
69 
74 void hal_dac_reset(reg_dac_t *dac)
75 __attribute__((deprecated("Please use DACx_RESET().")));
76 
83 void hal_dac_init(reg_dac_t *dac,
84  hal_dac_channel_t channel,
85  hal_dac_init_t init);
86 
93 void hal_dac_set_dma(reg_dac_t *dac,
94  hal_dac_channel_t channel,
95  hal_bool_t status);
96 
97 #endif
Initialization structure for digital analog converter.
Definition: hal_dac.h:60
hal_bool_t trigger_enable
Definition: hal_dac.h:61
Definition: hal_dac.h:48
void hal_dac_set_dma(reg_dac_t *dac, hal_dac_channel_t channel, hal_bool_t status)
Enables DMA on specified DAC.
Registries for STM32F4xx.
Definition: hal_dac.h:53
Definition: hal_dac.h:49
Definition: hal_dac.h:36
hal_bool_t buffer_enable
Definition: hal_dac.h:63
void hal_dac_init(reg_dac_t *dac, hal_dac_channel_t channel, hal_dac_init_t init)
Initializes the specified digital analog converter.
Definition: hal_dac.h:47
Definition: hal_dac.h:46
Common #defines and typedefs.
void hal_dac_reset(reg_dac_t *dac) __attribute__((deprecated("Please use DACx_RESET().")))
Resets DAC to default values.
hal_dac_trg_t trigger
Definition: hal_dac.h:62
Representation of DAC register.
Definition: reg_stm32f4xx.h:662
Definition: hal_dac.h:52
hal_dac_channel_t
Defines the channel of a DAC.
Definition: hal_dac.h:35
Definition: hal_dac.h:51
hal_dac_trg_t
Defines the available trigger inputs.
Definition: hal_dac.h:45
hal_bool_t
Often used TRUE / FALSE type.
Definition: hal_common.h:31
Definition: hal_dac.h:37
Definition: hal_dac.h:50