no-OS
ad5110.h
Go to the documentation of this file.
1 /**************************************************************************/
40 #ifndef _ad5110_H_
41 #define _ad5110_H_
42 
43 /*****************************************************************************/
44 /****************************** Include Files ********************************/
45 /*****************************************************************************/
46 #include <stdint.h>
47 #include "no_os_i2c.h"
48 
49 /******************************************************************************/
50 /************************* Input shift register *******************************/
51 /******************************************************************************/
52 
54 #define COMMAND 8
55 
56 #define CMD_NOP 0
57 #define CMD_WR_RDAC_EEPROM 1
58 #define CMD_WR_RDAC 2
59 #define CMD_SHUT_DOWN 3
60 #define CMD_RESET 4
61 #define CMD_RD_RDAC 5
62 #define CMD_RD_EEPROM 6
63 
64 #define SHUT_DOWN_OFF 0
65 #define SHUT_DOWN_ON 1
66 
67 #define WIPER_POSITION 0
68 #define RESISTOR_TOLERANCE 1
69 
70 /******************************************************************************/
71 /*************************** Types Declarations *******************************/
72 /******************************************************************************/
73 struct ad5110_dev {
74  /* I2C */
76  /* Device Settings */
77  uint8_t ad5110_dev_addr;
78 };
79 
81  /* I2C */
83  /* Device Settings */
84  uint8_t ad5110_dev_addr;
85 };
86 
87 /******************************************************************************/
88 /************************ Functions Declarations ******************************/
89 /******************************************************************************/
90 
92 int8_t ad5110_init(struct ad5110_dev **device,
94 
96 int32_t ad5110_remove(struct ad5110_dev *dev);
97 
99 void ad5110_write_rdac(struct ad5110_dev *dev,
100  uint8_t rdac_value);
101 
103 uint8_t ad5110_read_rdac(struct ad5110_dev *dev);
104 
106 void ad5110_write_rdac_eeprom(struct ad5110_dev *dev);
107 
109 uint8_t ad5110_read_wiper(struct ad5110_dev *dev);
110 
112 uint8_t ad5110_read_res_tolerance(struct ad5110_dev *dev);
113 
115 void ad5110_reset(struct ad5110_dev *dev);
116 
118 void ad5110_shut_down(struct ad5110_dev *dev,
119  uint8_t value);
120 
121 #endif // _ad5110_H_
ad5110_dev::i2c_desc
struct no_os_i2c_desc * i2c_desc
Definition: ad5110.h:75
xil_spi_ops
const struct no_os_spi_platform_ops xil_spi_ops
Xilinx platform specific SPI platform ops structure.
Definition: xilinx_spi.c:456
no_os_gpio_desc::extra
void * extra
Definition: no_os_gpio.h:112
no_os_list_desc
Structure storing the list and function wrapper for usual list types.
Definition: no_os_list.h:234
xil_gpio_irq_desc
Xilinx platform specific GPIO IRQ descriptor.
Definition: gpio_irq_extra.h:80
xil_gpio_irq_unregister_callback
int32_t xil_gpio_irq_unregister_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct callback_desc *cb)
Unregister pin specific GPIO interrupt.
Definition: xilinx_gpio_irq.c:273
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
NO_OS_GPIO_OUT
#define NO_OS_GPIO_OUT
Definition: no_os_gpio.h:53
xil_irq_ctrl_remove
int32_t xil_irq_ctrl_remove(struct no_os_irq_ctrl_desc *desc)
Free the resources allocated by no_os_irq_ctrl_init().
Definition: xilinx_irq.c:365
IRQ_PL
@ IRQ_PL
Definition: irq_extra.h:60
IIC_PS
@ IIC_PS
Definition: i2c_extra.h:61
no_os_i2c_write
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:85
irq_extra.h
no_os_i2c_init
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:51
no_os_spi_desc::device_id
uint32_t device_id
Definition: no_os_spi.h:134
xil_i2c_desc
Xilinx platform specific I2C descriptor.
Definition: i2c_extra.h:80
no_os_list_read_find
int32_t no_os_list_read_find(struct no_os_list_desc *list_desc, void **data, void *cmp_data)
xil_gpio_irq_ops
const struct no_os_irq_platform_ops xil_gpio_irq_ops
Xilinx platform specific GPIO IRQ platform ops structure.
Definition: xilinx_gpio_irq.c:351
NO_OS_SPI_CPOL
#define NO_OS_SPI_CPOL
Definition: no_os_spi.h:54
ad5110_dev
Definition: ad5110.h:73
inst_table_item::inst_no
uint32_t inst_no
Definition: xilinx_i2c.c:81
no_os_spi_init_param::bit_order
enum no_os_spi_bit_order bit_order
Definition: no_os_spi.h:122
xil_i2c_desc::device_id
uint32_t device_id
Definition: i2c_extra.h:84
xil_gpio_get_optional
int32_t xil_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: xilinx_gpio.c:175
xil_spi_desc::type
enum xil_spi_type type
Definition: spi_extra.h:91
ad5110_write_rdac
void ad5110_write_rdac(struct ad5110_dev *dev, uint8_t rdac_value)
Write the content of serial register data to RDAC.
Definition: ad5110.c:102
inst_table_item::instance
void * instance
Definition: xilinx_i2c.c:77
ad5110_init_param::ad5110_dev_addr
uint8_t ad5110_dev_addr
Definition: ad5110.h:84
no_os_callback_desc
Structure describing a callback to be registered.
Definition: no_os_irq.h:136
no_os_iterator_get
int32_t no_os_iterator_get(struct no_os_iterator *iter, void **data)
no_os_callback_desc::legacy_config
void * legacy_config
Definition: no_os_irq.h:150
ad5110_read_rdac
uint8_t ad5110_read_rdac(struct ad5110_dev *dev)
Read the content of RDAC register.
Definition: ad5110.c:122
xil_spi_init
int32_t xil_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: xilinx_spi.c:252
no_os_spi.h
Header file of SPI Interface.
no_os_irq.h
Header file of IRQ interface.
no_os_irq_register_callback
int32_t no_os_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register a callback to handle the irq events.
Definition: no_os_irq.c:82
no_os_i2c_init_param::slave_address
uint8_t slave_address
Definition: no_os_i2c.h:70
xil_i2c_desc::instance
void * instance
Definition: i2c_extra.h:88
CMD_RESET
#define CMD_RESET
Definition: ad5110.h:60
NO_OS_LIST_DEFAULT
@ NO_OS_LIST_DEFAULT
Definition: no_os_list.h:201
ad5110_shut_down
void ad5110_shut_down(struct ad5110_dev *dev, uint8_t value)
Software shutdown.
Definition: ad5110.c:246
no_os_i2c_remove
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:70
no_os_list_get_find
int32_t no_os_list_get_find(struct no_os_list_desc *list_desc, void **data, void *cmp_data)
CMD_SHUT_DOWN
#define CMD_SHUT_DOWN
Definition: ad5110.h:59
gpio_irq_extra.h
Implementation of Xilinx GPIO IRQ Generic Driver.
ad5110_dev::ad5110_dev_addr
uint8_t ad5110_dev_addr
Definition: ad5110.h:77
ad5110_remove
int32_t ad5110_remove(struct ad5110_dev *dev)
Free the resources allocated by ad5110_init().
Definition: ad5110.c:83
GPIO_PL
@ GPIO_PL
Definition: gpio_extra.h:60
_read
int _read(int file, char *ptr, int len)
Definition: maxim_stdio.c:106
xil_irq_register_callback
int32_t xil_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register a callback to handle the irq events.
Definition: xilinx_irq.c:244
xil_i2c_init_param
Definition: i2c_extra.h:69
no_os_spi_msg
Definition: no_os_spi.h:90
NO_OS_IS_ERR_VALUE
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:56
no_os_spi_platform_ops
Structure holding SPI function pointers that point to the platform specific function.
Definition: no_os_spi.h:153
no_os_delay.h
Header file of Delay functions.
xil_spi_init_param::flags
uint32_t flags
Definition: spi_extra.h:82
xil_i2c_init
int32_t xil_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: xilinx_i2c.c:160
xil_gpio_ops
const struct no_os_gpio_platform_ops xil_gpio_ops
Xilinx platform specific GPIO platform ops structure.
Definition: xilinx_gpio.c:455
CMD_WR_RDAC
#define CMD_WR_RDAC
Definition: ad5110.h:58
xil_i2c_ops
const struct no_os_i2c_platform_ops xil_i2c_ops
Xilinx platform specific I2C platform ops structure.
Definition: xilinx_i2c.c:92
xil_gpio_desc::type
enum xil_gpio_type type
Definition: gpio_extra.h:83
no_os_list_get_first
int32_t no_os_list_get_first(struct no_os_list_desc *list_desc, void **data)
no_os_spi_init_param::mode
enum no_os_spi_mode mode
Definition: no_os_spi.h:120
ad5110_read_wiper
uint8_t ad5110_read_wiper(struct ad5110_dev *dev)
Read wiper position from EEPROM.
Definition: ad5110.c:169
xil_gpio_get_value
int32_t xil_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: xilinx_gpio.c:415
device
Definition: ad9361_util.h:75
no_os_gpio_init_param::number
int32_t number
Definition: no_os_gpio.h:89
xil_gpio_irq_ctrl_remove
int32_t xil_gpio_irq_ctrl_remove(struct no_os_irq_ctrl_desc *desc)
Remove the GPIO IRQ controller.
Definition: xilinx_gpio_irq.c:328
no_os_irq_platform_ops::init
int32_t(* init)(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Definition: no_os_irq.h:166
ad5110_read_rdac
uint8_t ad5110_read_rdac(struct ad5110_dev *dev)
Read the content of RDAC register.
Definition: ad5110.c:122
xil_gpio_init_param::device_id
uint32_t device_id
Definition: gpio_extra.h:74
xil_spi_write_and_read
int32_t xil_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: xilinx_spi.c:364
xil_i2c_desc::type
enum xil_i2c_type type
Definition: i2c_extra.h:82
xil_irq_desc
Xilinx platform specific IRQ descriptor.
Definition: irq_extra.h:79
xil_gpio_direction_output
int32_t xil_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: xilinx_gpio.c:256
no_os_list_desc::push
f_add push
Definition: no_os_list.h:236
ad5110_init
int8_t ad5110_init(struct ad5110_dev **device, struct ad5110_init_param init_param)
Initializes the communication with the device.
Definition: ad5110.c:58
NO_OS_GPIO_IN
#define NO_OS_GPIO_IN
Definition: no_os_gpio.h:54
xil_gpio_irq_enable
int32_t xil_gpio_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific GPIO IRQ pin.
Definition: xilinx_gpio_irq.c:299
no_os_irq_init_param::extra
void * extra
Definition: no_os_irq.h:112
no_os_i2c_init_param::extra
void * extra
Definition: no_os_i2c.h:74
xil_callback_desc::pin_nb
int32_t pin_nb
Definition: gpio_irq_extra.h:60
no_os_spi_msg::tx_buff
uint8_t * tx_buff
Definition: no_os_spi.h:92
no_os_spi_init_param::device_id
uint32_t device_id
Definition: no_os_spi.h:114
ad5110_init_param::i2c_init
struct no_os_i2c_init_param i2c_init
Definition: ad5110.h:82
no_os_spi_init_param::chip_select
uint8_t chip_select
Definition: no_os_spi.h:118
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:132
no_os_i2c_desc::slave_address
uint8_t slave_address
Definition: no_os_i2c.h:87
no_os_spi_desc::chip_select
uint8_t chip_select
Definition: no_os_spi.h:138
no_os_min
#define no_os_min(x, y)
Definition: no_os_util.h:63
xil_spi_remove
int32_t xil_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: xilinx_spi.c:306
xil_gpio_desc::instance
void * instance
Definition: gpio_extra.h:87
no_os_error.h
Error codes definition.
no_os_iterator_move
int32_t no_os_iterator_move(struct no_os_iterator *iter, int32_t steps)
xil_irq_desc::type
enum xil_irq_type type
Definition: irq_extra.h:81
xil_gpio_irq_init_param
Structure holding the initialization parameters for Xilinx platform specific GPIO IRQ parameters.
Definition: gpio_irq_extra.h:71
xil_spi_desc::instance
void * instance
Definition: spi_extra.h:97
no_os_i2c_init_param::max_speed_hz
uint32_t max_speed_hz
Definition: no_os_i2c.h:68
xil_irq_ops
const struct no_os_irq_platform_ops xil_irq_ops
Xilinx platform specific IRQ platform ops structure.
Definition: xilinx_irq.c:378
no_os_spi_msg::rx_buff
uint8_t * rx_buff
Definition: no_os_spi.h:94
no_os_callback_desc::ctx
void * ctx
Definition: no_os_irq.h:148
ad5110_read_wiper
uint8_t ad5110_read_wiper(struct ad5110_dev *dev)
Read wiper position from EEPROM.
Definition: ad5110.c:169
no_os_spi_msg::cs_change
uint8_t cs_change
Definition: no_os_spi.h:98
xil_i2c_remove
int32_t xil_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: xilinx_i2c.c:317
no_os_irq_trig_level
no_os_irq_trig_level
Definition: no_os_irq.h:77
no_os_irq_init_param::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:105
no_os_callback_desc::legacy_callback
void(* legacy_callback)(void *ctx, uint32_t event, void *extra)
Definition: no_os_irq.h:145
CMD_RD_EEPROM
#define CMD_RD_EEPROM
Definition: ad5110.h:62
inst_table_item::device_id
uint32_t device_id
Definition: xilinx_i2c.c:79
ad5110_write_rdac_eeprom
void ad5110_write_rdac_eeprom(struct ad5110_dev *dev)
Write the content of RDAC register to EEPROM.
Definition: ad5110.c:149
xil_gpio_set_value
int32_t xil_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: xilinx_gpio.c:367
no_os_i2c_desc::max_speed_hz
uint32_t max_speed_hz
Definition: no_os_i2c.h:85
no_os_i2c_platform_ops
Structure holding I2C function pointers that point to the platform specific function.
Definition: no_os_i2c.h:99
xil_gpio_irq_disable
int32_t xil_gpio_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific GPIO IRQ pin.
Definition: xilinx_gpio_irq.c:108
xil_gpio_desc::config
void * config
Definition: gpio_extra.h:85
no_os_spi_desc::bit_order
enum no_os_spi_bit_order bit_order
Definition: no_os_spi.h:142
xil_callback_desc
Structure holding callback parameters for each pin.
Definition: gpio_irq_extra.h:59
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:132
no_os_i2c_platform_ops::i2c_ops_init
int32_t(* i2c_ops_init)(struct no_os_i2c_desc **, const struct no_os_i2c_init_param *)
Definition: no_os_i2c.h:101
xil_i2c_write
int32_t xil_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
Write data to a slave device.
Definition: xilinx_i2c.c:392
CMD_WR_RDAC_EEPROM
#define CMD_WR_RDAC_EEPROM
Definition: ad5110.h:57
ad5110_shut_down
void ad5110_shut_down(struct ad5110_dev *dev, uint8_t value)
Software shutdown.
Definition: ad5110.c:246
ad5110_remove
int32_t ad5110_remove(struct ad5110_dev *dev)
Free the resources allocated by ad5110_init().
Definition: ad5110.c:83
no_os_callback_desc::callback
void(* callback)(void *context)
Definition: no_os_irq.h:138
xil_gpio_irq_desc::my_Gpio
XGpioPs my_Gpio
Definition: gpio_irq_extra.h:82
xil_spi_init_param::type
enum xil_spi_type type
Definition: spi_extra.h:80
xil_gpio_get_direction
int32_t xil_gpio_get_direction(struct no_os_gpio_desc *desc, uint8_t *direction)
Get the direction of the specified GPIO.
Definition: xilinx_gpio.c:321
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
xil_irq_desc::instance
void * instance
Definition: irq_extra.h:83
xil_irq_global_disable
int32_t xil_irq_global_disable(struct no_os_irq_ctrl_desc *desc)
Disable global interrupts.
Definition: xilinx_irq.c:171
ad5110_init_param
Definition: ad5110.h:80
i2c_extra.h
xil_irq_unregister_callback
int32_t xil_irq_unregister_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct callback_desc *cb)
Unregisters a generic IRQ handling function.
Definition: xilinx_irq.c:336
no_os_list_remove
int32_t no_os_list_remove(struct no_os_list_desc *list_desc)
xil_spi_reg_ops_pl
const struct no_os_spi_platform_ops xil_spi_reg_ops_pl
Xilinx SPI PS register functions. No extra param needed.
irq_id
irq_id
Interrupts IDs supported by the irq driver.
Definition: aducm3029_irq.h:68
xil_spi_type
xil_spi_type
Xilinx platform architecture sections.
Definition: spi_extra.h:64
no_os_spi_msg::bytes_number
uint32_t bytes_number
Definition: no_os_spi.h:96
no_os_i2c_desc
Structure holding I2C descriptor.
Definition: no_os_i2c.h:81
no_os_spi_desc::extra
void * extra
Definition: no_os_spi.h:145
IIC_PL
@ IIC_PL
Definition: i2c_extra.h:59
xil_spi_init_param
Structure holding the initialization parameters for Xilinx platform specific SPI parameters when usin...
Definition: spi_extra.h:78
no_os_i2c_read
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:104
gpio_extra.h
ad5110_write_rdac_eeprom
void ad5110_write_rdac_eeprom(struct ad5110_dev *dev)
Write the content of RDAC register to EEPROM.
Definition: ad5110.c:149
no_os_i2c.h
Header file of I2C Interface.
no_os_spi_init_param::max_speed_hz
uint32_t max_speed_hz
Definition: no_os_spi.h:116
RESISTOR_TOLERANCE
#define RESISTOR_TOLERANCE
Definition: ad5110.h:68
NO_OS_SPI_BIT_ORDER_LSB_FIRST
@ NO_OS_SPI_BIT_ORDER_LSB_FIRST
Definition: no_os_spi.h:83
xil_gpio_irq_register_callback
int32_t xil_gpio_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register pin specific GPIO interrupt.
Definition: xilinx_gpio_irq.c:243
spi_type
spi_type
Altera platform architecture types.
Definition: spi_extra.h:52
no_os_list.h
List library header.
ad5110_reset
void ad5110_reset(struct ad5110_dev *dev)
Software reset; makes a refresh of RDAC register with EEPROM.
Definition: ad5110.c:223
no_os_i2c_init_param
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
no_os_iterator_remove
int32_t no_os_iterator_remove(struct no_os_iterator *iter)
NULL
#define NULL
Definition: wrapper.h:64
ad5110_read_res_tolerance
uint8_t ad5110_read_res_tolerance(struct ad5110_dev *dev)
Read resistor tolerance from EEPROM.
Definition: ad5110.c:196
WIPER_POSITION
#define WIPER_POSITION
Definition: ad5110.h:67
SPI_PS
@ SPI_PS
Definition: spi_extra.h:68
no_os_irq_ctrl_desc::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:121
xil_gpio_irq_init_param::gpio_device_id
int32_t gpio_device_id
Definition: gpio_irq_extra.h:73
no_os_iterator_move_to_idx
int32_t no_os_iterator_move_to_idx(struct no_os_iterator *iter, int32_t idx)
xil_callback_desc::enabled
bool enabled
Definition: gpio_irq_extra.h:63
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
IRQ_PS
@ IRQ_PS
Definition: irq_extra.h:62
ad5110.h
Header file of ad5110 Driver for Microblaze processor.
no_os_irq_init_param
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:103
NO_OS_IRQ_EDGE_RISING
@ NO_OS_IRQ_EDGE_RISING
Definition: no_os_irq.h:81
no_os_iterator_read
int32_t no_os_iterator_read(struct no_os_iterator *iter, void **data)
xil_i2c_init_param::type
enum xil_i2c_type type
Definition: i2c_extra.h:71
xil_irq_disable
int32_t xil_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: xilinx_irq.c:214
xil_gpio_init_param
Structure holding the initialization parameters for Xilinx platform specific GPIO parameters.
Definition: gpio_extra.h:70
xil_gpio_remove
int32_t xil_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: xilinx_gpio.c:191
xil_spi_desc
Xilinx platform specific SPI descriptor.
Definition: spi_extra.h:89
no_os_irq_enable
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:144
no_os_gpio_platform_ops
Structure holding gpio function pointers that point to the platform specific function.
Definition: no_os_gpio.h:133
no_os_gpio_init_param::extra
void * extra
Definition: no_os_gpio.h:95
no_os_gpio.h
Header file of GPIO Interface.
no_os_irq_platform_ops
Structure holding IRQ function pointers that point to the platform specific function.
Definition: no_os_irq.h:164
SPI_DEASSERT_CURRENT_SS
#define SPI_DEASSERT_CURRENT_SS
Definition: spi_extra.h:54
xil_gpio_irq_trigger_level_set
int32_t xil_gpio_irq_trigger_level_set(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig)
Set GPIO interrupt trigger level.
Definition: xilinx_gpio_irq.c:218
xil_i2c_init_param::device_id
uint32_t device_id
Definition: i2c_extra.h:73
xil_irq_enable
int32_t xil_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: xilinx_irq.c:185
no_os_spi_desc::max_speed_hz
uint32_t max_speed_hz
Definition: no_os_spi.h:136
NO_OS_IRQ_EDGE_BOTH
@ NO_OS_IRQ_EDGE_BOTH
Definition: no_os_irq.h:82
xil_irq_ctrl_init
int32_t xil_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the IRQ interrupts.
Definition: xilinx_irq.c:69
spi_extra.h
inst_table_item
Table item for I2C cores already started.
Definition: xilinx_i2c.c:75
xil_callback_desc::triggered
bool triggered
Definition: gpio_irq_extra.h:62
_gpio_init
int32_t _gpio_init(struct no_os_gpio_desc *desc, const struct no_os_gpio_init_param *param)
Prepare the GPIO decriptor.
Definition: xilinx_gpio.c:68
xil_callback_desc::callback
struct no_os_callback_desc callback
Definition: gpio_irq_extra.h:61
no_os_list_add_last
int32_t no_os_list_add_last(struct no_os_list_desc *list_desc, void *data)
no_os_list_init
int32_t no_os_list_init(struct no_os_list_desc **list_desc, enum no_os_adapter_type type, f_cmp comparator)
ad5110_read_res_tolerance
uint8_t ad5110_read_res_tolerance(struct ad5110_dev *dev)
Read resistor tolerance from EEPROM.
Definition: ad5110.c:196
no_os_iterator_init
int32_t no_os_iterator_init(struct no_os_iterator **iter, struct no_os_list_desc *list_desc, bool start)
no_os_util.h
Header file of utility functions.
ad5110_init
int8_t ad5110_init(struct ad5110_dev **device, struct ad5110_init_param init_param)
Initializes the communication with the device.
Definition: ad5110.c:58
no_os_i2c_desc::extra
void * extra
Definition: no_os_i2c.h:91
no_os_gpio_platform_ops::gpio_ops_get
int32_t(* gpio_ops_get)(struct no_os_gpio_desc **, const struct no_os_gpio_init_param *)
Definition: no_os_gpio.h:135
xil_spi_desc::config
void * config
Definition: spi_extra.h:95
NO_OS_SPI_CPHA
#define NO_OS_SPI_CPHA
Definition: no_os_spi.h:53
no_os_spi_platform_ops::init
int32_t(* init)(struct no_os_spi_desc **, const struct no_os_spi_init_param *)
Definition: no_os_spi.h:155
no_os_spi_init_param::extra
void * extra
Definition: no_os_spi.h:125
no_os_irq_trigger_level_set
int32_t no_os_irq_trigger_level_set(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig)
Set interrupt trigger level.
Definition: no_os_irq.c:128
xil_gpio_irq_desc::it
struct no_os_iterator * it
Definition: gpio_irq_extra.h:84
xil_gpio_get
int32_t xil_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: xilinx_gpio.c:140
xil_i2c_read
int32_t xil_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
Read data from a slave device.
Definition: xilinx_i2c.c:457
xil_gpio_irq_init_param::parent_desc
struct no_os_irq_ctrl_desc * parent_desc
Definition: gpio_irq_extra.h:72
no_os_spi_desc::mode
enum no_os_spi_mode mode
Definition: no_os_spi.h:140
no_os_irq_ctrl_desc
Definition: no_os_irq.h:119
xil_gpio_irq_desc::callback_list
struct no_os_list_desc * callback_list
Definition: gpio_irq_extra.h:83
no_os_irq_ctrl_desc::extra
void * extra
Definition: no_os_irq.h:128
no_os_gpio_desc::number
int32_t number
Definition: no_os_gpio.h:106
no_os_iterator_find
int32_t no_os_iterator_find(struct no_os_iterator *iter, void *cmp_data)
xil_gpio_init_param::type
enum xil_gpio_type type
Definition: gpio_extra.h:72
CMD_RD_RDAC
#define CMD_RD_RDAC
Definition: ad5110.h:61
ad5110_reset
void ad5110_reset(struct ad5110_dev *dev)
Software reset; makes a refresh of RDAC register with EEPROM.
Definition: ad5110.c:223
xil_spi_desc::flags
uint32_t flags
Definition: spi_extra.h:93
GPIO_PS
@ GPIO_PS
Definition: gpio_extra.h:62
xil_gpio_irq_ctrl_init
int32_t xil_gpio_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the GPIO IRQ controller.
Definition: xilinx_gpio_irq.c:138
ad5110_write_rdac
void ad5110_write_rdac(struct ad5110_dev *dev, uint8_t rdac_value)
Write the content of serial register data to RDAC.
Definition: ad5110.c:102
xil_gpio_direction_input
int32_t xil_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: xilinx_gpio.c:207
xil_irq_init_param
Structure holding the initialization parameters for Xilinx platform specific IRQ parameters.
Definition: irq_extra.h:70
xil_gpio_desc
Xilinx platform specific GPIO descriptor.
Definition: gpio_extra.h:81
_write
int _write(int file, char *ptr, int len)
Definition: maxim_stdio.c:123
SPI_CS_DECODE
#define SPI_CS_DECODE
Definition: spi_extra.h:53
SPI_PL
@ SPI_PL
Definition: spi_extra.h:66
xil_i2c_desc::config
void * config
Definition: i2c_extra.h:86
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:112
xil_irq_global_enable
int32_t xil_irq_global_enable(struct no_os_irq_ctrl_desc *desc)
Enable global interrupts.
Definition: xilinx_irq.c:159
xil_irq_trigger_level_set
int32_t xil_irq_trigger_level_set(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig)
Set interrupt trigger level.
Definition: xilinx_irq.c:292