Go to the documentation of this file.
55 #define LTC2358_BYTES_PER_CH 3
56 #define LTC2358_CHANNEL_MSK NO_OS_GENMASK(2, 0)
86 uint32_t *config_word);
90 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:59
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:102
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:124
Header file of SPI Interface.
Definition: no_os_spi.h:91
Definition: ad9361_util.h:75
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:102
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:60
#define LTC2358_CHANNEL_MSK
Definition: ltc2358.h:56
uint8_t * tx_buff
Definition: no_os_spi.h:93
Structure holding the parameters for ltc2358 initialization.
Definition: ltc2358.h:66
uint32_t no_os_get_unaligned_be24(uint8_t *buf)
Implementation of LTC2358 Driver.
Structure holding SPI descriptor.
Definition: no_os_spi.h:177
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:59
int32_t ltc2358_remove(struct ltc2358_dev *dev)
Free memory allocated by ltc2358_init().
Definition: ltc2358.c:152
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:191
struct no_os_spi_desc * spi_desc
Definition: ltc2358.h:77
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
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
#define LTC2358_BYTES_PER_CH
Definition: ltc2358.h:55
struct no_os_spi_init_param * spi_init
Definition: ltc2358.h:68
Structure holding ltc2358 descriptor.
Definition: ltc2358.h:75
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
int32_t ltc2358_remove(struct ltc2358_dev *dev)
Free memory allocated by ltc2358_init().
Definition: ltc2358.c:152
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
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:124
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131