no-OS
|
Implementation of LTC2358 Driver. More...
Functions | |
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. More... | |
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. More... | |
int32_t | ltc2358_init (struct ltc2358_dev **device, struct ltc2358_init_param *init_param) |
Initialize the device. More... | |
int32_t | ltc2358_remove (struct ltc2358_dev *dev) |
Free memory allocated by ltc2358_init(). More... | |
Implementation of LTC2358 Driver.
Copyright 2022(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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.
dev | - Device handler. |
config_word | - 24-bit config word created. |
data_array | - 24 bytes of data from 8 channels. |
channel | - Selected channel (0-7). |
readval | - 3 bytes raw data for specific channel. |
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.
channel | - Channel number. |
config_number | - Configuration number for the channel. |
config_word | - 24-bit config word created. |
int32_t ltc2358_init | ( | struct ltc2358_dev ** | device, |
struct ltc2358_init_param * | init_param | ||
) |
Initialize the device.
device | - The device structure. |
init_param | - The structure that contains the device initial parameters. |
int32_t ltc2358_remove | ( | struct ltc2358_dev * | dev | ) |
Free memory allocated by ltc2358_init().
dev | - Device handler. |