no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ltc2358.h
Go to the documentation of this file.
1/***************************************************************************/
33
34#ifndef LTC2358_H
35#define LTC2358_H
36
37#include <stdint.h>
38#include "no_os_spi.h"
39#include "no_os_util.h"
40
41#define LTC2358_BYTES_PER_CH 3
42#define LTC2358_CHANNEL_MSK NO_OS_GENMASK(2, 0)
43
49 /* SPI Initialization structure. */
51};
52
58 /* SPI handler */
60};
61
62/* Creates 24-bit configuration word for the 8 channels. */
63void ltc2358_create_config_word(uint8_t channel, uint8_t config_number,
64 uint32_t *config_word);
65
66/* Parse single channel data. */
67int32_t ltc2358_channel_data(struct ltc2358_dev *dev, uint32_t config_word,
68 uint8_t data_array[24], uint8_t channel, uint32_t *readval);
69
70/* Initializes the LTC2358. */
71int32_t ltc2358_init(struct ltc2358_dev **device,
73
74/* Free the resources allocated by ltc2358_init(). */
75int32_t ltc2358_remove(struct ltc2358_dev *dev);
76
77#endif /* LTC2358_H */
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
void ltc2358_create_config_word(uint8_t channel, uint8_t config_number, uint32_t *config_word)
Create 24-bit configuration word for the 8 channels.
Definition ltc2358.c:45
int32_t ltc2358_init(struct ltc2358_dev **device, struct ltc2358_init_param *init_param)
Initialize the device.
Definition ltc2358.c:110
int32_t ltc2358_remove(struct ltc2358_dev *dev)
Free memory allocated by ltc2358_init().
Definition ltc2358.c:138
int32_t ltc2358_channel_data(struct ltc2358_dev *dev, uint32_t config_word, uint8_t data_array[24], uint8_t channel, uint32_t *readval)
Read single channel data.
Definition ltc2358.c:88
Header file of SPI Interface.
Header file of utility functions.
Definition ad9361_util.h:63
Structure holding ltc2358 descriptor.
Definition ltc2358.h:57
struct no_os_spi_desc * spi_desc
Definition ltc2358.h:59
Structure holding the parameters for ltc2358 initialization.
Definition ltc2358.h:48
struct no_os_spi_init_param * spi_init
Definition ltc2358.h:50
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128