Go to the documentation of this file.
49 #define LTC2358_BYTES_PER_CH 3
50 #define LTC2358_CHANNEL_MSK NO_OS_GENMASK(2, 0)
80 uint32_t *config_word);
84 uint8_t data_array[24], uint8_t channel, uint32_t *readval);
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:53
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:96
void no_os_put_unaligned_be24(uint32_t val, uint8_t *buf)
int32_t ltc2358_init(struct ltc2358_dev **device, struct ltc2358_init_param *init_param)
Initialize the device.
Definition: ltc2358.c:118
Header file of SPI Interface.
Definition: no_os_spi.h:100
Definition: ad9361_util.h:69
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:96
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
#define LTC2358_CHANNEL_MSK
Definition: ltc2358.h:50
uint8_t * tx_buff
Definition: no_os_spi.h:102
Structure holding the parameters for ltc2358 initialization.
Definition: ltc2358.h:60
uint32_t no_os_get_unaligned_be24(uint8_t *buf)
Implementation of LTC2358 Driver.
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
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:53
int32_t ltc2358_remove(struct ltc2358_dev *dev)
Free memory allocated by ltc2358_init().
Definition: ltc2358.c:146
int32_t no_os_spi_transfer(struct no_os_spi_desc *desc, struct no_os_spi_msg *msgs, uint32_t len)
Iterate over head list and send all spi messages.
Definition: no_os_spi.c:185
struct no_os_spi_desc * spi_desc
Definition: ltc2358.h:71
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:69
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define LTC2358_BYTES_PER_CH
Definition: ltc2358.h:49
struct no_os_spi_init_param * spi_init
Definition: ltc2358.h:62
Structure holding ltc2358 descriptor.
Definition: ltc2358.h:69
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:116
int32_t ltc2358_remove(struct ltc2358_dev *dev)
Free memory allocated by ltc2358_init().
Definition: ltc2358.c:146
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:52
Header file of utility functions.
Error macro definition for ARM Compiler.
int32_t ltc2358_init(struct ltc2358_dev **device, struct ltc2358_init_param *init_param)
Initialize the device.
Definition: ltc2358.c:118
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140