Header file of ad5110 Driver for Microblaze processor.
More...
#include <stdint.h>
#include "no_os_i2c.h"
Header file of ad5110 Driver for Microblaze processor.
- Author
- Lucian Sin (Lucia.nosp@m.n.Si.nosp@m.n@ana.nosp@m.log..nosp@m.com)
Copyright 2013(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
◆ CMD_NOP
◆ CMD_RD_EEPROM
◆ CMD_RD_RDAC
◆ CMD_RESET
◆ CMD_SHUT_DOWN
◆ CMD_WR_RDAC
◆ CMD_WR_RDAC_EEPROM
| #define CMD_WR_RDAC_EEPROM 1 |
◆ COMMAND
< Command position in transmitted bytes Available Commands
◆ RESISTOR_TOLERANCE
| #define RESISTOR_TOLERANCE 1 |
◆ SHUT_DOWN_OFF
◆ SHUT_DOWN_ON
◆ WIPER_POSITION
◆ ad5110_init()
Initializes the communication with the device.
Free the resources allocated by ad5110_init().
- Parameters
-
| device | - The device structure. |
| init_param | - The structure that contains the device initial parameters. |
- Returns
- status - Result of the initialization procedure. Example: 0 - if initialization was successful; -1 - if initialization was unsuccessful.
◆ ad5110_read_rdac()
| uint8_t ad5110_read_rdac |
( |
struct ad5110_dev * | dev | ) |
|
Read the content of RDAC register.
Write the content of RDAC register to EEPROM.
- Parameters
-
| dev | - The device structure. |
- Returns
- rdacValue - Value read from register.
◆ ad5110_read_res_tolerance()
| uint8_t ad5110_read_res_tolerance |
( |
struct ad5110_dev * | dev | ) |
|
Read resistor tolerance from EEPROM.
Software reset; makes a refresh of RDAC register with EEPROM.
- Parameters
-
| dev | - The device structure. |
- Returns
- resTolerance - Value read from EEPROM.
◆ ad5110_read_wiper()
| uint8_t ad5110_read_wiper |
( |
struct ad5110_dev * | dev | ) |
|
Read wiper position from EEPROM.
Read resistor tolerance from EEPROM.
- Parameters
-
| dev | - The device structure. |
- Returns
- wiperValue - Value read from EEPROM.
◆ ad5110_remove()
Free the resources allocated by ad5110_init().
Write the content of serial register data to RDAC.
- Parameters
-
| dev | - The device structure. |
- Returns
- ret - The result of the remove procedure.
◆ ad5110_reset()
Software reset; makes a refresh of RDAC register with EEPROM.
Software shutdown.
- Parameters
-
| dev | - The device structure. |
◆ ad5110_shut_down()
| void ad5110_shut_down |
( |
struct ad5110_dev * | dev, |
|
|
uint8_t | value ) |
Software shutdown.
- Parameters
-
| dev | - The device structure. |
| value | - the value written to shut down register. Example: ShutDownOff - the device is on. ShutDownOn - the device is shut down. |
◆ ad5110_write_rdac()
| void ad5110_write_rdac |
( |
struct ad5110_dev * | dev, |
|
|
uint8_t | rdac_value ) |
Write the content of serial register data to RDAC.
Read the content of RDAC register.
- Parameters
-
| dev | - The device structure. |
| rdac_value | - Value of the serial register. |
◆ ad5110_write_rdac_eeprom()
| void ad5110_write_rdac_eeprom |
( |
struct ad5110_dev * | dev | ) |
|
Write the content of RDAC register to EEPROM.
Read wiper position from EEPROM.
- Parameters
-
| dev | - The device structure. |