no-OS
ad7091r.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef __AD7091R_H__
41 #define __AD7091R_H__
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include <stdint.h>
47 #include "no_os_spi.h"
48 
49 /******************************************************************************/
50 /*************************** Types Declarations *******************************/
51 /******************************************************************************/
52 
53 struct ad7091r_dev {
54  /* SPI */
56 };
57 
59  /* SPI */
61 };
62 
63 /******************************************************************************/
64 /************************ Functions Declarations ******************************/
65 /******************************************************************************/
66 
68 int8_t ad7091r_init(struct ad7091r_dev **device,
70 
72 int32_t ad5686_remove(struct ad7091r_dev *dev);
73 
75 void ad7091r_software_reset(struct ad7091r_dev *dev);
76 
78 uint16_t ad7091r_read_sample(struct ad7091r_dev *dev);
79 
81 void ad7091r_power_down(struct ad7091r_dev *dev);
82 
84 void ad7091r_power_up(struct ad7091r_dev *dev);
85 
87 float ad7091r_convert_to_volts(int16_t raw_sample, float v_ref);
88 
89 #endif /* __AD7091R_H__ */
ad7091r_software_reset
void ad7091r_software_reset(struct ad7091r_dev *dev)
Initiate a software reset of the device. The AD7091R requires the user to initiate a software reset w...
Definition: ad7091r.c:112
no_os_alloc.h
ad7091r_convert_to_volts
float ad7091r_convert_to_volts(int16_t raw_sample, float v_ref)
Converts a 12-bit raw sample to volts.
Definition: ad7091r.c:197
no_os_spi_write_and_read
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:165
no_os_spi.h
Header file of SPI Interface.
ad7091r_read_sample
uint16_t ad7091r_read_sample(struct ad7091r_dev *dev)
Initiates one conversion and reads back the result. During this process the device runs in normal mod...
Definition: ad7091r.c:135
ad7091r_dev::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ad7091r.h:55
device
Definition: ad9361_util.h:75
ad7091r_init
int8_t ad7091r_init(struct ad7091r_dev **device, struct ad7091r_init_param init_param)
Initializes the communication peripheral and the initial Values for AD7092R Board.
Definition: ad7091r.c:65
ad7091r_init_param
Definition: ad7091r.h:58
ad7091r_power_up
void ad7091r_power_up(struct ad7091r_dev *dev)
Powers up the device by pulling CONVST high. After calling this function, a time delay is required be...
Definition: ad7091r.c:180
ad7091r_software_reset
void ad7091r_software_reset(struct ad7091r_dev *dev)
Initiate a software reset of the device. The AD7091R requires the user to initiate a software reset w...
Definition: ad7091r.c:112
ad7091r.h
Header file of AD7091R Driver.
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:177
ad7091r_dev
Definition: ad7091r.h:53
no_os_malloc
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:49
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:75
ad7091r_remove
int32_t ad7091r_remove(struct ad7091r_dev *dev)
Free the resources allocated by ad7091r_init().
Definition: ad7091r.c:93
ad7091r_power_down
void ad7091r_power_down(struct ad7091r_dev *dev)
Puts the device in power-down mode.
Definition: ad7091r.c:158
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
ad7091r_read_sample
uint16_t ad7091r_read_sample(struct ad7091r_dev *dev)
Initiates one conversion and reads back the result. During this process the device runs in normal mod...
Definition: ad7091r.c:135
ad5686_remove
int32_t ad5686_remove(struct ad7091r_dev *dev)
ad7091r_init_param::spi_init
struct no_os_spi_init_param spi_init
Definition: ad7091r.h:60
no_os_spi_remove
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:122
ad7091r_init
int8_t ad7091r_init(struct ad7091r_dev **device, struct ad7091r_init_param init_param)
Initializes the communication peripheral and the initial Values for AD7092R Board.
Definition: ad7091r.c:65
ad7091r_convert_to_volts
float ad7091r_convert_to_volts(int16_t raw_sample, float v_ref)
Converts a 12-bit raw sample to volts.
Definition: ad7091r.c:197
no_os_spi_init
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:58
ad7091r_power_up
void ad7091r_power_up(struct ad7091r_dev *dev)
Powers up the device by pulling CONVST high. After calling this function, a time delay is required be...
Definition: ad7091r.c:180
ad7091r_power_down
void ad7091r_power_down(struct ad7091r_dev *dev)
Puts the device in power-down mode.
Definition: ad7091r.c:158
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131