|
int32_t | ad7799_read (struct ad7799_dev *device, uint8_t reg_addr, uint32_t *reg_data) |
| Read device register. More...
|
|
int32_t | ad7799_write (struct ad7799_dev *device, uint8_t reg_addr, uint32_t reg_data) |
| Write device register. More...
|
|
int32_t | ad7799_reset (struct ad7799_dev *device) |
| Software reset of the device. More...
|
|
int32_t | ad7799_set_mode (struct ad7799_dev *device, uint8_t mode) |
| Set the device mode. More...
|
|
int32_t | ad7799_set_channel (struct ad7799_dev *device, uint8_t ch) |
| Select the ADC channel. More...
|
|
int32_t | ad7799_get_channel (struct ad7799_dev *device, uint8_t ch, uint32_t *reg_data) |
| Read specific ADC channel. More...
|
|
int32_t | ad7799_read_channel (struct ad7799_dev *device, uint8_t ch, int32_t *data_scaled) |
| Read data from specific ADC channel with specified precision. More...
|
|
int32_t | ad7799_set_gain (struct ad7799_dev *device, uint8_t gain) |
| Set the ADC gain. More...
|
|
int32_t | ad7799_get_gain (struct ad7799_dev *device, uint8_t *gain) |
| Get the ADC gain. More...
|
|
int32_t | ad7799_set_refdet (struct ad7799_dev *device, uint8_t ref_en) |
| Enable or disable the reference detect function. More...
|
|
int32_t | ad7799_set_polarity (struct ad7799_dev *device, uint8_t polarity) |
| Set ADC polarity. More...
|
|
int32_t | ad7799_dev_ready (struct ad7799_dev *device) |
| Read the /RDY bit of status register and check the status of the device. More...
|
|
int32_t | ad7799_init (struct ad7799_dev **device, const struct ad7799_init_param *init_param) |
| Initialize the device. More...
|
|
int32_t | ad7799_remove (struct ad7799_dev *device) |
| Remove the device and release resources. More...
|
|
Implementation of AD7798/AD7799 Driver.
- Author
- Antoniu Miclaus (anton.nosp@m.iu.m.nosp@m.iclau.nosp@m.s@an.nosp@m.alog..nosp@m.com)
Copyright 2020(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.