Loading...
Searching...
No Matches

Detailed Description

Author
Bas Stottelaar basst.nosp@m.otte.nosp@m.laar@.nosp@m.gmai.nosp@m.l.com

Definition in file gp8xxx.h.

#include "periph/i2c.h"
#include "gp8xxx_info.h"
+ Include dependency graph for gp8xxx.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gp8xxx_params_t
 Device initialization parameters. More...
 
struct  gp8xxx_saul_params_t
 SAUL device initialization parameters. More...
 
struct  gp8xxx_t
 Device descriptor for the driver. More...
 
struct  gp8xxx_saul_t
 SAUL device descriptor for the driver. More...
 

Enumerations

enum  gp8xxx_channel_t { GP8XXX_CHANNEL_0 = 0 , GP8XXX_CHANNEL_1 = 1 , GP8XXX_CHANNEL_ALL = 2 }
 Compile time macros to enable/disable features. More...
 
enum  gp8xxx_output_range_t {
  GP8XXX_OUTPUT_RANGE_2_5V = 2500 , GP8XXX_OUTPUT_RANGE_VCC = 3300 , GP8XXX_OUTPUT_RANGE_5V = 5000 , GP8XXX_OUTPUT_RANGE_10V = 10000 ,
  GP8XXX_OUTPUT_RANGE_25_MA = 25000
}
 Output range values. More...
 

Functions

int gp8xxx_init (gp8xxx_t *dev, const gp8xxx_params_t *params)
 Initialize the given device.
 
int gp8xxx_set_dac (gp8xxx_t *dev, gp8xxx_channel_t channel, uint16_t value)
 Set the DAC value.
 
int gp8xxx_set_voltage_range (gp8xxx_t *dev, gp8xxx_output_range_t value)
 Set the output range.
 
int gp8xxx_set_voltage (gp8xxx_t *dev, gp8xxx_channel_t channel, uint16_t voltage)
 Set the voltage.
 
void gp8xxx_set_current_calibration (gp8xxx_t *dev, uint16_t calibration_4ma, uint16_t calibration_20ma)
 Set the current calibration values.
 
int gp8xxx_set_current (gp8xxx_t *dev, gp8xxx_channel_t channel, uint16_t current)
 Set the current.