1 /*
2  * Copyright (c) 2020-2020, BLUETRUM Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef AB32BG1_HAL_DAC_H__
8 #define AB32BG1_HAL_DAC_H__
9 
10 #include "ab32vg1_hal_def.h"
11 
12 struct dac_init
13 {
14 
15 };
16 
17 struct dac_handle
18 {
19     hal_sfr_t           instance;
20     struct dac_init     init;
21 };
22 
23 /* Initialization functions */
24 hal_error_t hal_dac_init(struct dac_handle *hdac);
25 void hal_dac_deinit(uint32_t dacx);
26 void hal_dac_mspinit(struct dac_handle *hdac);
27 
28 void hal_dac_control(uint32_t dacx, uint32_t cntl, uint32_t param);
29 void hal_dac_write(uint32_t dacx, uint32_t data);
30 uint32_t hal_dac_read(uint32_t dacx);
31 
32 #endif
33