Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_DAC/AP_DAC_TIx3204.h
4182 views
1
#include "AP_DAC_config.h"
2
3
#if AP_DAC_TIX3204_ENABLED
4
#include "AP_DAC_Backend.h"
5
6
class AP_DAC_TIx3204 : public AP_DAC_Backend
7
{
8
public:
9
using AP_DAC_Backend::AP_DAC_Backend;
10
11
virtual ~AP_DAC_TIx3204() {}
12
13
void init(void) override;
14
15
// set voltage for a channel
16
bool set_voltage(uint8_t chan, float v) override;
17
18
private:
19
AP_HAL::OwnPtr<AP_HAL::Device> dev;
20
21
bool register_read(uint8_t reg, uint16_t &val);
22
bool register_write(uint8_t reg, uint16_t val);
23
24
bool configured[4];
25
};
26
27
#endif // AP_DAC_TIX3204_ENABLED
28
29