HomeAut
commonDac.h
1 /*
2  * commonDac.h
3  *
4  * Created on: 2016. nov. 21.
5  * Author: Vizi Gábor
6  * E-mail: vizi.gabor90@gmail.com
7  * Function: -
8  * Target: STM32Fx
9  * Version: -
10  * Last modified: 2016. dec. 13.
11  */
12 
13 #ifndef COMMONDAC_H_
14 #define COMMONDAC_H_
15 
16 
17 #include "include.h"
18 
19 
20 #ifdef CONFIG_MODULE_COMMON_DAC_ENABLE
21 
22 /*------------------------------------------------------------------------------
23  * Type definitions
24  *----------------------------------------------------------------------------*/
25 
27 typedef enum
28 {
29  Channel_Unknown,
30  Channel_1,
31  Channel_2
32 } DAC_Channel_t;
33 
34 
35 
36 /*------------------------------------------------------------------------------
37  * Global variables
38  *----------------------------------------------------------------------------*/
39 
40 extern DAC_HandleTypeDef DacHandle;
41 
42 
43 
44 /*------------------------------------------------------------------------------
45  * Global function declarations
46  *----------------------------------------------------------------------------*/
47 
48 void HAL_DAC_MspInit(DAC_HandleTypeDef* hdac);
49 void DAC_Init(void);
50 bool DAC_SetValue (DAC_Channel_t channel, float voltage);
51 
52 
53 #endif
54 
55 
56 #endif /* COMMONDAC_H_ */