no-OS
|
Implementation of AD5592R Base Driver. More...
Functions | |
int32_t | ad5592r_base_reg_write (struct ad5592r_dev *dev, uint8_t reg, uint16_t value) |
int32_t | ad5592r_base_reg_read (struct ad5592r_dev *dev, uint8_t reg, uint16_t *value) |
int32_t | ad5592r_gpio_get (struct ad5592r_dev *dev, uint8_t offset) |
int32_t | ad5592r_gpio_set (struct ad5592r_dev *dev, uint8_t offset, int32_t value) |
int32_t | ad5592r_gpio_direction_input (struct ad5592r_dev *dev, uint8_t offset) |
int32_t | ad5592r_gpio_direction_output (struct ad5592r_dev *dev, uint8_t offset, int32_t value) |
int32_t | ad5592r_software_reset (struct ad5592r_dev *dev) |
int32_t | ad5592r_set_channel_modes (struct ad5592r_dev *dev) |
int32_t | ad5592r_reset_channel_modes (struct ad5592r_dev *dev) |
Implementation of AD5592R Base Driver.
Copyright 2018, 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:
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.
int32_t ad5592r_base_reg_read | ( | struct ad5592r_dev * | dev, |
uint8_t | reg, | ||
uint16_t * | value | ||
) |
Read register.
dev | - The device structure. |
reg | - The register address. |
value | - register value |
int32_t ad5592r_base_reg_write | ( | struct ad5592r_dev * | dev, |
uint8_t | reg, | ||
uint16_t | value | ||
) |
Write register.
dev | - The device structure. |
reg | - The register address. |
value | - register value |
int32_t ad5592r_gpio_direction_input | ( | struct ad5592r_dev * | dev, |
uint8_t | offset | ||
) |
Set GPIO as input
dev | - The device structure. |
offset | - The channel number. |
int32_t ad5592r_gpio_direction_output | ( | struct ad5592r_dev * | dev, |
uint8_t | offset, | ||
int32_t | value | ||
) |
Set GPIO as output
dev | - The device structure. |
offset | - The channel number. |
value | - GPIO value to set. |
int32_t ad5592r_gpio_get | ( | struct ad5592r_dev * | dev, |
uint8_t | offset | ||
) |
Get GPIO value
dev | - The device structure. |
offset | - The channel number. |
int32_t ad5592r_gpio_set | ( | struct ad5592r_dev * | dev, |
uint8_t | offset, | ||
int32_t | value | ||
) |
Set GPIO value
dev | - The device structure. |
offset | - The channel number. |
value | - the GPIO value (0 or 1) |
int32_t ad5592r_reset_channel_modes | ( | struct ad5592r_dev * | dev | ) |
Reset channels and set GPIO to unused.
dev | - The device structure. |
int32_t ad5592r_set_channel_modes | ( | struct ad5592r_dev * | dev | ) |
Set channels modes.
dev | - The device structure. |
int32_t ad5592r_software_reset | ( | struct ad5592r_dev * | dev | ) |
Software reset device.
dev | - The device structure. |