|
int | adm1177_init (struct adm1177_dev **device, struct adm1177_init_param *init_param) |
| Initializes I2C. More...
|
|
int | adm1177_remove (struct adm1177_dev *device) |
| Free the resources allocated by adm1177_init(). More...
|
|
int | adm1177_set_vrange (struct adm1177_dev *device, uint8_t vrange) |
|
- Sets the vrange off the ADM1177.
More...
|
|
int | adm1177_write (struct adm1177_dev *device, uint8_t cmd, uint8_t reg_address) |
|
- In the write command byte operation, the master device sends a command byte to the slave device.
More...
|
|
int | adm1177_read_status (struct adm1177_dev *device, uint8_t *status_byte) |
|
- Reads the status byte from the ADC if requested and transmits it through the status_byte pointer.
More...
|
|
int | adm1177_read_conv (struct adm1177_dev *device, uint16_t *conv_voltage, uint16_t *conv_current) |
|
- Gets the voltage/current readback from the ADM1177s I2C ADC, if the device is initialized right and transmits the requested values.
More...
|
|
int | adm1177_to_microvolts (struct adm1177_dev *device, uint16_t raw_sample, uint64_t *voltage_uv) |
|
- Converts the raw sample from the Readback into uV.
More...
|
|
int | adm1177_to_microampers (uint16_t raw_sample, uint64_t *current_ua) |
|
- Converts the raw sample from the Readback into uA.
More...
|
|
Source file of ADM1177 Driver.
Header file of ADM1177 Driver.
- Author
- Radu Sabau (radu..nosp@m.saba.nosp@m.u@ana.nosp@m.log..nosp@m.com)
Copyright 2023(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.