no-OS
Loading...
Searching...
No Matches
ad5246.h
Go to the documentation of this file.
1/***************************************************************************/
32#ifndef AD5246_H_
33#define AD5246_H_
34
35#include "../common/dpot.h"
36#include "no_os_spi.h"
37#include "no_os_i2c.h"
38#include "no_os_gpio.h"
39#include "no_os_util.h"
40
46 /* Interface type */
48 /* I2C init parameters */
50};
51
57 /* I2C descriptor */
59};
60
61int ad5246_dpot_init(struct dpot_init_param *init_params,
62 struct dpot_dev **desc);
63int ad5246_dpot_remove(struct dpot_dev *desc);
64
65int ad5246_dpot_chn_read(struct dpot_dev *desc,
66 enum dpot_chn_type chn, uint8_t *data);
67int ad5246_dpot_chn_write(struct dpot_dev *desc,
68 enum dpot_chn_type chn, uint8_t data);
69#endif // ad5246_H_
int ad5246_dpot_chn_write(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t data)
Write to the digital potentiometer channel.
Definition ad5246.c:211
int ad5246_dpot_init(struct dpot_init_param *init_params, struct dpot_dev **desc)
Initialize the ad5246 digital potentiometer.
Definition ad5246.c:94
int ad5246_dpot_remove(struct dpot_dev *desc)
Free the memory allocated by ad5246_dpot_init().
Definition ad5246.c:157
int ad5246_dpot_chn_read(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t *data)
Read the ad5246 digital potentiometer channel.
Definition ad5246.c:184
dpot_chn_type
Digital potentiometer channel type.
Definition dpot.h:81
dpot_intf_type
digital potentiometer interface type.
Definition dpot.h:72
Header file of GPIO Interface.
Header file of I2C Interface.
Header file of SPI Interface.
Header file of utility functions.
ad5246 digital potentiometer device descriptor parameters.
Definition ad5246.h:55
enum dpot_intf_type intf_type
Definition ad5246.h:56
struct no_os_i2c_desc * i2c_desc
Definition ad5246.h:58
ad5246 digital potentiometer init parameters.
Definition ad5246.h:45
struct no_os_i2c_init_param * i2c_init
Definition ad5246.h:49
enum dpot_intf_type eIntfType
Definition ad5246.h:47
Digital potentiometer device descriptor parameters.
Definition dpot.h:175
Digital potentiometer init parameters.
Definition dpot.h:157
Structure holding I2C address descriptor.
Definition no_os_i2c.h:89
Structure holding the parameters for I2C initialization.
Definition no_os_i2c.h:52