Header file of ADXRS453 Driver.
More...
#include <stdint.h>
#include "no_os_spi.h"
Header file of ADXRS453 Driver.
- Author
- DBogdan (drago.nosp@m.s.bo.nosp@m.gdan@.nosp@m.anal.nosp@m.og.co.nosp@m.m)
Copyright 2013(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
◆ ADXRS453_READ
| #define ADXRS453_READ (1 << 7) |
◆ ADXRS453_REG_FAULT
| #define ADXRS453_REG_FAULT 0x0A |
◆ ADXRS453_REG_HICST
| #define ADXRS453_REG_HICST 0x06 |
◆ ADXRS453_REG_LOCST
| #define ADXRS453_REG_LOCST 0x04 |
◆ ADXRS453_REG_PID
| #define ADXRS453_REG_PID 0x0C |
◆ ADXRS453_REG_QUAD
| #define ADXRS453_REG_QUAD 0x08 |
◆ ADXRS453_REG_RATE
| #define ADXRS453_REG_RATE 0x00 |
◆ ADXRS453_REG_SN_HIGH
| #define ADXRS453_REG_SN_HIGH 0x0E |
◆ ADXRS453_REG_SN_LOW
| #define ADXRS453_REG_SN_LOW 0x10 |
◆ ADXRS453_REG_TEM
| #define ADXRS453_REG_TEM 0x02 |
◆ ADXRS453_SENSOR_DATA
| #define ADXRS453_SENSOR_DATA (1 << 5) |
◆ ADXRS453_WRITE
| #define ADXRS453_WRITE (1 << 6) |
◆ adxrs453_get_rate()
Reads the rate data and converts it to degrees/second.
Reads the rate data and converts it to degrees/second.
- Parameters
-
| dev | - The device structure. |
- Returns
- rate - The rate value in degrees/second.
< If data received is in positive degree range
< If data received is in negative degree range
◆ adxrs453_get_register_value()
| 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.
- Parameters
-
| dev | - The device structure. |
| register_address | - Address of the register. |
- Returns
- register_value - Value of the register.
◆ adxrs453_get_sensor_data()
| uint32_t adxrs453_get_sensor_data |
( |
struct adxrs453_dev * | dev | ) |
|
Reads the sensor data.
Reads the sensor data.
- Parameters
-
| dev | - The device structure. |
- Returns
- register_value - The sensor data.
◆ adxrs453_get_temperature()
Reads the temperature sensor data and converts it to degrees Celsius.
Reads the temperature sensor data and converts it to degrees Celsius.
- Parameters
-
| dev | - The device structure. |
- Returns
- temperature - The temperature value in degrees Celsius.
◆ adxrs453_init()
Initializes the ADXRS453 and checks if the device is present.
Initializes the ADXRS453 and checks if the device is present.
- Parameters
-
| device | - The device structure. |
| init_param | - The structure that contains the device initial parameters. |
- Returns
- status - Result of the initialization procedure. Example: 0 - if initialization was successful (ID starts with 0x52). -1 - if initialization was unsuccessful.
◆ adxrs453_remove()
Free the resources allocated by adxrs453_init().
Free the resources allocated by adxrs453_init().
- Parameters
-
| dev | - The device structure. |
- Returns
- ret - The result of the remove procedure.
◆ adxrs453_set_register_value()
| 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.
- Parameters
-
| dev | - The device structure. |
| register_address | - Address of the register. |
| register_value | - Data value to write. |