libxr
1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
stm32_dac.hpp
1
#include "main.h"
2
3
#if defined(HAL_DAC_MODULE_ENABLED)
4
5
#ifdef DAC
6
#undef DAC
7
#endif
8
9
#include "dac.hpp"
10
11
namespace
LibXR
12
{
13
17
class
STM32DAC :
public
DAC
18
{
19
public
:
23
STM32DAC(DAC_HandleTypeDef* hdac, uint32_t channel,
float
init_voltage = 0.0f,
24
float
vref = 3.3f);
25
32
ErrorCode Write(
float
voltage)
override
;
33
34
private
:
35
DAC_HandleTypeDef* hdac_;
36
uint32_t channel_;
37
float
vref_;
38
uint32_t align_;
39
uint16_t resolution_;
40
};
41
42
}
// namespace LibXR
43
44
#endif
LibXR
LibXR 命名空间
Definition
ch32_can.hpp:14
driver
st
stm32_dac.hpp
Generated by
1.12.0