no-OS
Loading...
Searching...
No Matches
adxrs453.c File Reference

Implementation of ADXRS453 Driver. More...

#include <stdlib.h>
#include "adxrs453.h"
#include "no_os_alloc.h"
Include dependency graph for adxrs453.c:

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.
 
int32_t adxrs453_remove (struct adxrs453_dev *dev)
 Free the resources allocated by adxrs453_init().
 
uint16_t adxrs453_get_register_value (struct adxrs453_dev *dev, uint8_t register_address)
 Reads the value of a register.
 
void adxrs453_set_register_value (struct adxrs453_dev *dev, uint8_t register_address, uint16_t register_value)
 Writes data into a register.
 
uint32_t adxrs453_get_sensor_data (struct adxrs453_dev *dev)
 Reads the sensor data.
 
float adxrs453_get_rate (struct adxrs453_dev *dev)
 Reads the rate data and converts it to degrees/second.
 
float adxrs453_get_temperature (struct adxrs453_dev *dev)
 Reads the temperature sensor data and converts it to degrees Celsius.
 

Detailed Description

Implementation 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

Function Documentation

◆ adxrs453_get_rate()

float adxrs453_get_rate ( struct adxrs453_dev * dev)

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.

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.

Parameters
dev- The device structure.
Returns
register_value - The sensor data.

◆ adxrs453_get_temperature()

float adxrs453_get_temperature ( struct adxrs453_dev * dev)

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()

int32_t adxrs453_init ( struct adxrs453_dev ** device,
struct adxrs453_init_param init_param )

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()

int32_t adxrs453_remove ( struct adxrs453_dev * dev)

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.

Parameters
dev- The device structure.
register_address- Address of the register.
register_value- Data value to write.