no-OS
Loading...
Searching...
No Matches
ad5259.h
Go to the documentation of this file.
1/***************************************************************************/
32#ifndef AD5259_H_
33#define AD5259_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 /* Digipot operating mode.*/
52};
53
60 /* I2C descriptor */
62};
63/* ad5259 digital potentiometer ops */
64int ad5259_dpot_init(struct dpot_init_param *init_params,
65 struct dpot_dev **desc);
66int ad5259_dpot_remove(struct dpot_dev *desc);
67
68int ad5259_dpot_chn_read(struct dpot_dev *desc,
69 enum dpot_chn_type chn, uint8_t *data);
70int ad5259_dpot_chn_write(struct dpot_dev *desc,
71 enum dpot_chn_type chn, uint8_t data);
72int ad5259_dpot_nvm_read(struct dpot_dev *desc,
73 enum dpot_chn_type chn, uint8_t *data);
74int ad5259_dpot_nvm_write(struct dpot_dev *desc,
75 enum dpot_chn_type chn, uint8_t data);
77 enum dpot_chn_type chn);
79 enum dpot_chn_type chn);
80#endif // ad5259_H_
int ad5259_dpot_copy_nvm_to_rdac(struct dpot_dev *desc, enum dpot_chn_type chn)
Copy NVM/EEPROM data to RDAC.
Definition ad5259.c:352
int ad5259_dpot_remove(struct dpot_dev *desc)
Free the memory allocated by ad5259_dpot_init().
Definition ad5259.c:140
int ad5259_dpot_chn_read(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t *data)
Read the ad5259 digital potentiometer channel.
Definition ad5259.c:167
int ad5259_dpot_init(struct dpot_init_param *init_params, struct dpot_dev **desc)
Initialize the ad5259 digital potentiometer.
Definition ad5259.c:79
int ad5259_dpot_nvm_read(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t *data)
Read the NVM (non-volatile) memory data.
Definition ad5259.c:224
int ad5259_dpot_nvm_write(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t data)
Write data to NVM (non-volatile) memory.
Definition ad5259.c:292
int ad5259_dpot_chn_write(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t data)
Write to the digital potentiometer channel.
Definition ad5259.c:196
int ad5259_dpot_copy_rdac_to_nvm(struct dpot_dev *desc, enum dpot_chn_type chn)
Copy RDAC register to NVM/EEPROM.
Definition ad5259.c:321
dpot_operating_mode
Digital potentiometer operating mode.
Definition dpot.h:106
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.
ad5259 digital potentiometer device descriptor parameters.
Definition ad5259.h:58
enum dpot_intf_type intf_type
Definition ad5259.h:59
struct no_os_i2c_desc * i2c_desc
Definition ad5259.h:61
ad5259 digital potentiometer init parameters.
Definition ad5259.h:45
enum dpot_operating_mode operating_mode
Definition ad5259.h:51
enum dpot_intf_type eIntfType
Definition ad5259.h:47
struct no_os_i2c_init_param * i2c_init
Definition ad5259.h:49
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