pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
pflib::AD5593R Class Reference

Partial clone from python code, with just needed functionalities for testing for now. More...

#include <ad5593r.h>

Collaboration diagram for pflib::AD5593R:
[legend]

Public Member Functions

 AD5593R (const std::string &bus, uint8_t addr)
 
void setup_gpi (int pin, bool pull_down=false)
 
void setup_gpo (int pin, int value=-1)
 
bool is_gpo (int pin)
 
bool gpo_get_value (int pin)
 
void setup_dac (int pin, bool zero=true)
 
void setup_adc (int pin)
 
int adc_read (int pin)
 
float adc_volts (int pin, int ave=10)
 
void dac_write (int pin, uint16_t value)
 
void clear_pin (int pin)
 

Private Member Functions

uint16_t read_reg (uint8_t reg)
 
void write_reg (uint8_t reg, uint16_t value)
 
void set_bit (uint8_t reg, int bit)
 
void clear_bit (uint8_t reg, int bit)
 

Private Attributes

lpGBT_ConfigTransport_I2C i2c_
 

Static Private Attributes

static constexpr uint8_t REG_DAC_PIN = 0x05
 
static constexpr uint8_t REG_ADC_PIN = 0x04
 
static constexpr uint8_t REG_OPENDRAIN = 0x0C
 
static constexpr uint8_t REG_GPO_ENABLE = 0x08
 
static constexpr uint8_t REG_GPI_ENABLE = 0x0A
 
static constexpr uint8_t REG_ADC_SEQ = 0x02
 
static constexpr uint8_t REG_GENERAL = 0x03
 
static constexpr uint8_t REG_POWERDOWN = 0x0B
 
static constexpr uint8_t REG_PULLDOWN = 0x06
 
static constexpr uint8_t REG_GPO_WRITE = 0x09
 
static constexpr uint8_t REG_GPI_READ = 0x60
 
static constexpr uint8_t REG_RESET = 0x0F
 

Detailed Description

Partial clone from python code, with just needed functionalities for testing for now.


The documentation for this class was generated from the following file: