no-OS
|
Implementation of ADXRS453 Driver. More...
Functions | |
int32_t | adxrs453_init (struct adxrs453_dev **device, struct adxrs453_init_param init_param) |
Initializes the ADXRS453 and checks if the device is present. More... | |
int32_t | adxrs453_remove (struct adxrs453_dev *dev) |
Free the resources allocated by adxrs453_init(). More... | |
uint16_t | adxrs453_get_register_value (struct adxrs453_dev *dev, uint8_t register_address) |
Reads the value of a register. More... | |
void | adxrs453_set_register_value (struct adxrs453_dev *dev, uint8_t register_address, uint16_t register_value) |
Writes data into a register. More... | |
uint32_t | adxrs453_get_sensor_data (struct adxrs453_dev *dev) |
Reads the sensor data. More... | |
float | adxrs453_get_rate (struct adxrs453_dev *dev) |
Reads the rate data and converts it to degrees/second. More... | |
float | adxrs453_get_temperature (struct adxrs453_dev *dev) |
Reads the temperature sensor data and converts it to degrees Celsius. More... | |
Implementation of ADXRS453 Driver.
Copyright 2013(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.
float adxrs453_get_rate | ( | struct adxrs453_dev * | dev | ) |
Reads the rate data and converts it to degrees/second.
dev | - The device structure. |
< If data received is in positive degree range
< If data received is in negative degree range
uint16_t adxrs453_get_register_value | ( | struct adxrs453_dev * | dev, |
uint8_t | register_address | ||
) |
Reads the value of a register.
dev | - The device structure. |
register_address | - Address of the register. |
uint32_t adxrs453_get_sensor_data | ( | struct adxrs453_dev * | dev | ) |
Reads the sensor data.
dev | - The device structure. |
float adxrs453_get_temperature | ( | struct adxrs453_dev * | dev | ) |
Reads the temperature sensor data and converts it to degrees Celsius.
dev | - The device structure. |
int32_t adxrs453_init | ( | struct adxrs453_dev ** | device, |
struct adxrs453_init_param | init_param | ||
) |
Initializes the ADXRS453 and checks if the device is present.
device | - The device structure. |
init_param | - The structure that contains the device initial parameters. |
int32_t adxrs453_remove | ( | struct adxrs453_dev * | dev | ) |
Free the resources allocated by adxrs453_init().
dev | - The device structure. |
void adxrs453_set_register_value | ( | struct adxrs453_dev * | dev, |
uint8_t | register_address, | ||
uint16_t | register_value | ||
) |
Writes data into a register.
dev | - The device structure. |
register_address | - Address of the register. |
register_value | - Data value to write. |