Go to the documentation of this file.
39 #ifndef __MAX11205_H__
40 #define __MAX11205_H__
55 #define MAX11205_VREF_MAX_MV 3600
56 #define MAX11205_DATA_SIZE_BYTES 2
57 #define MAX11205_SCALE NO_OS_GENMASK(14,0)
int max11205_get_data_raw(struct max11205_dev *dev, bool *new_data_avail, int16_t *data_raw)
Get the converted data.
Definition: max11205.c:172
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
Definition: max11205.h:79
int32_t no_os_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: no_os_spi.c:95
Structure describing a callback to be registered.
Definition: no_os_irq.h:136
Header file of SPI Interface.
Header file of IRQ interface.
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:94
Definition: ad9361_util.h:75
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:130
@ NO_OS_IRQ_EDGE_FALLING
Definition: no_os_irq.h:80
struct no_os_callback_desc irq_cb
Definition: max11205.h:70
int max11205_init(struct max11205_dev **device, struct max11205_init_param init_param)
Initializes the communication peripheral.
Definition: max11205.c:90
struct no_os_spi_init_param spi_init
Definition: max11205.h:81
#define MAX11205_DATA_SIZE_BYTES
Definition: max11205.h:56
struct no_os_irq_ctrl_desc * irq_ctrl
Definition: max11205.h:85
bool data_updated
Definition: max11205.h:76
int32_t no_os_irq_unregister_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Unregisters a generic IRQ handling function.
Definition: no_os_irq.c:114
struct no_os_gpio_init_param * gpio_rdy
Definition: max11205.h:83
int max11205_remove(struct max11205_dev *dev)
Free memory allocated by max11205_init().
Definition: max11205.c:208
uint32_t vref_mv
Definition: max11205.h:87
int max11205_get_data_raw(struct max11205_dev *dev, bool *new_data_avail, int16_t *data_raw)
Get the converted data.
Definition: max11205.c:172
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:110
Structure holding SPI descriptor.
Definition: no_os_spi.h:143
void(* callback)(void *context)
Definition: no_os_irq.h:138
Definition: max11205.h:62
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
struct no_os_gpio_desc * gpio_rdy
Definition: max11205.h:66
int max11205_get_data_mv(struct max11205_dev *dev, int16_t raw_data, int32_t *data_mv)
Get the converted data.
Definition: max11205.c:192
#define MAX11205_VREF_MAX_MV
Definition: max11205.h:55
int max11205_init(struct max11205_dev **device, struct max11205_init_param init_param)
Initializes the communication peripheral.
Definition: max11205.c:90
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
@ NO_OS_EVT_GPIO
Definition: no_os_irq.h:68
#define MAX11205_SCALE
Definition: max11205.h:57
int max11205_remove(struct max11205_dev *dev)
Free memory allocated by max11205_init().
Definition: max11205.c:208
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:77
uint32_t vref_mv
Definition: max11205.h:72
int max11205_get_data_mv(struct max11205_dev *dev, int16_t raw_data, int32_t *data_mv)
Get the converted data.
Definition: max11205.c:192
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:183
Implementation of max11205.h.
Header file of GPIO Interface.
int16_t adc_data_raw
Definition: max11205.h:74
@ NO_OS_GPIO_IRQ
Definition: no_os_irq.h:86
struct no_os_spi_desc * spi_desc
Definition: max11205.h:64
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:51
uint16_t no_os_get_unaligned_be16(uint8_t *buf)
Header file of utility functions.
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:164
int32_t no_os_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: no_os_irq.c:200
struct no_os_irq_ctrl_desc * irq_ctrl
Definition: max11205.h:68
Definition: no_os_irq.h:119
int32_t number
Definition: no_os_gpio.h:106
Error macro definition for ARM Compiler.
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:58
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:121
int32_t no_os_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: no_os_gpio.c:81