no-OS
|
Header file of ADXRS453 Driver. More...
Go to the source code of this file.
Classes | |
struct | adxrs453_dev |
struct | adxrs453_init_param |
Macros | |
#define | ADXRS453_READ (1 << 7) |
#define | ADXRS453_WRITE (1 << 6) |
#define | ADXRS453_SENSOR_DATA (1 << 5) |
#define | ADXRS453_REG_RATE 0x00 |
#define | ADXRS453_REG_TEM 0x02 |
#define | ADXRS453_REG_LOCST 0x04 |
#define | ADXRS453_REG_HICST 0x06 |
#define | ADXRS453_REG_QUAD 0x08 |
#define | ADXRS453_REG_FAULT 0x0A |
#define | ADXRS453_REG_PID 0x0C |
#define | ADXRS453_REG_SN_HIGH 0x0E |
#define | ADXRS453_REG_SN_LOW 0x10 |
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... | |
Header file 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.
#define ADXRS453_READ (1 << 7) |
#define ADXRS453_REG_FAULT 0x0A |
#define ADXRS453_REG_HICST 0x06 |
#define ADXRS453_REG_LOCST 0x04 |
#define ADXRS453_REG_PID 0x0C |
#define ADXRS453_REG_QUAD 0x08 |
#define ADXRS453_REG_RATE 0x00 |
#define ADXRS453_REG_SN_HIGH 0x0E |
#define ADXRS453_REG_SN_LOW 0x10 |
#define ADXRS453_REG_TEM 0x02 |
#define ADXRS453_SENSOR_DATA (1 << 5) |
#define ADXRS453_WRITE (1 << 6) |
float adxrs453_get_rate | ( | struct adxrs453_dev * | dev | ) |
Reads the rate data and converts it to degrees/second.
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.
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.
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.
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.
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().
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.
Writes data into a register.
dev | - The device structure. |
register_address | - Address of the register. |
register_value | - Data value to write. |