|
int | adt7420_reg_read (struct adt7420_dev *dev, uint16_t register_address, uint16_t *data) |
| Reads the value of a register. More...
|
|
int | adt7420_reg_update_bits (struct adt7420_dev *dev, uint16_t register_address, uint8_t mask, uint8_t value) |
| Sets the value of a register SPI/I2C. More...
|
|
int | adt7420_spi_reg_write (struct adt7420_dev *dev, uint16_t register_address, uint32_t data) |
| Write a value of a register via SPI. More...
|
|
int | adt7420_i2c_reg_write (struct adt7420_dev *dev, uint16_t register_address, uint32_t data) |
| Write a value of a register via I2C. More...
|
|
int | adt7420_reg_write (struct adt7420_dev *dev, uint16_t register_address, uint32_t data) |
| Sets the value of a register SPI/I2C. More...
|
|
int32_t | adt7420_init (struct adt7420_dev **device, struct adt7420_init_param init_param) |
| Initializes the communication peripheral and checks if the device is present. More...
|
|
int32_t | adt7420_remove (struct adt7420_dev *dev) |
| Free the resources allocated by adt7420_init(). More...
|
|
int | adt7420_set_operation_mode (struct adt7420_dev *dev, uint8_t mode) |
| Sets the operational mode for ADT7420/ADT7320. More...
|
|
int | adt7420_set_resolution (struct adt7420_dev *dev, uint8_t resolution) |
| Sets the resolution for ADT7420/ADT7320. More...
|
|
int32_t | adt7420_reset (struct adt7420_dev *dev) |
| Resets the SPI or I2C inteface for the ADT7420/ADT7320. More...
|
|
float | adt7420_get_temperature (struct adt7420_dev *dev) |
| Reads the temperature data and converts it to Celsius degrees. More...
|
|
int | adt7420_spi_reg_read (struct adt7420_dev *dev, uint16_t register_address, uint16_t *data) |
| Reads the value of a register SPI interface device. More...
|
|
int | adt7420_i2c_reg_read (struct adt7420_dev *dev, uint16_t register_address, uint16_t *data) |
| Reads the value of a register I2C interface device. More...
|
|
bool | adt7420_is_spi (struct adt7420_dev *dev) |
| Check if the interface of the selected device is SPI. More...
|
|
Implementation of ADT7420 Driver.
- Author
- DBogdan (drago.nosp@m.s.bo.nosp@m.gdan@.nosp@m.anal.nosp@m.og.co.nosp@m.m)
Copyright 2012, 2019, 2021(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.