LibDriver ADXL345  2.0.0
ADXL345 full-featured driver
adxl345 extern driver function

adxl345 extern driver modules More...

Functions

uint8_t adxl345_set_reg (adxl345_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 set the chip register More...
 
uint8_t adxl345_get_reg (adxl345_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 get the chip register More...
 

Detailed Description

adxl345 extern driver modules

Function Documentation

◆ adxl345_get_reg()

uint8_t adxl345_get_reg ( adxl345_handle_t handle,
uint8_t  reg,
uint8_t *  buf,
uint16_t  len 
)

get the chip register

Parameters
[in]*handlepointer to an adxl345 handle structure
[in]regregister address
[out]*bufpointer to a data buffer
[in]lenlength of data buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3890 of file driver_adxl345.c.

◆ adxl345_set_reg()

uint8_t adxl345_set_reg ( adxl345_handle_t handle,
uint8_t  reg,
uint8_t *  buf,
uint16_t  len 
)

set the chip register

Parameters
[in]*handlepointer to an adxl345 handle structure
[in]regregister address
[in]*bufpointer to a data buffer
[in]lenlength of data buffer
Returns
status code
  • 0 success
  • 1 write failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3863 of file driver_adxl345.c.