no-OS
|
Source file for the ad2s1210 driver. More...
#include <stdlib.h>
#include "ad2s1210.h"
#include "no_os_util.h"
#include "no_os_error.h"
#include "no_os_print_log.h"
#include "no_os_delay.h"
#include "no_os_alloc.h"
Functions | |
int | ad2s1210_reg_write (struct ad2s1210_dev *dev, uint8_t addr, uint8_t val) |
int | ad2s1210_reg_read (struct ad2s1210_dev *dev, uint8_t addr, uint8_t *val) |
int | ad2s1210_reinit_excitation_frequency (struct ad2s1210_dev *dev, uint16_t fexcit) |
int | ad2s1210_get_excitation_frequency (struct ad2s1210_dev *dev, uint16_t *fexcit) |
int | ad2s1210_hysteresis_is_enabled (struct ad2s1210_dev *dev) |
int | ad2s1210_set_hysteresis (struct ad2s1210_dev *dev, bool enable) |
int | ad2s1210_init (struct ad2s1210_dev **dev, struct ad2s1210_init_param *init_param) |
int | ad2s1210_spi_single_conversion (struct ad2s1210_dev *dev, uint32_t active_mask, void *data, uint32_t size) |
Returns the result of a conversion. More... | |
int | ad2s1210_remove (struct ad2s1210_dev *dev) |
Remove the driver's descriptor by freeing the associated resources. More... | |
Source file for the ad2s1210 driver.
Copyright (c) 2023 Analog Devices, Inc. Copyright (c) 2023 BayLibre, SAS.
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.
int ad2s1210_get_excitation_frequency | ( | struct ad2s1210_dev * | dev, |
uint16_t * | fexcit | ||
) |
int ad2s1210_hysteresis_is_enabled | ( | struct ad2s1210_dev * | dev | ) |
int ad2s1210_init | ( | struct ad2s1210_dev ** | dev, |
struct ad2s1210_init_param * | init_param | ||
) |
int ad2s1210_reg_read | ( | struct ad2s1210_dev * | dev, |
uint8_t | addr, | ||
uint8_t * | val | ||
) |
int ad2s1210_reg_write | ( | struct ad2s1210_dev * | dev, |
uint8_t | addr, | ||
uint8_t | val | ||
) |
int ad2s1210_reinit_excitation_frequency | ( | struct ad2s1210_dev * | dev, |
uint16_t | fexcit | ||
) |
int ad2s1210_remove | ( | struct ad2s1210_dev * | dev | ) |
Remove the driver's descriptor by freeing the associated resources.
dev | - Device descriptor. |
int ad2s1210_set_hysteresis | ( | struct ad2s1210_dev * | dev, |
bool | enable | ||
) |
int ad2s1210_spi_single_conversion | ( | struct ad2s1210_dev * | dev, |
uint32_t | active_mask, | ||
void * | data, | ||
uint32_t | size | ||
) |
Returns the result of a conversion.
dev | - The device structure. |
active_mask | - mask of active channels angle = bit 0, velocity = bit 1 |
data | - Buffer to store sampled register data. |
size | - size in bytes of the data buffer |