Nordic Thingy:52
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Accelerometer

Low power accelerometer driver API. More...

Modules

 LIS3DH accelerometer
 Definitions of LIS3DH constants.
 

Data Structures

struct  drv_acc_cfg_t
 LIS3DH accelerometer configuration struct. More...
 

Enumerations

enum  { DRV_ACC_STATUS_CODE_SUCCESS, DRV_ACC_STATUS_CODE_INVALID_PARAM, DRV_ACC_STATUS_WRONG_DEVICE, DRV_ACC_STATUS_UNINITALIZED }
 The return status codes. More...
 

Functions

ret_code_t drv_acc_init (drv_acc_cfg_t const *const p_cfg)
 Accelerometer driver initialization. More...
 
ret_code_t drv_acc_wakeup_prepare (bool p_wakeup)
 Prepare for sleep and subsequent wakeup. More...
 

Detailed Description

Low power accelerometer driver API.

Enumeration Type Documentation

anonymous enum

The return status codes.

Enumerator
DRV_ACC_STATUS_CODE_SUCCESS 

Successful.

DRV_ACC_STATUS_CODE_INVALID_PARAM 

Invalid parameters.

DRV_ACC_STATUS_WRONG_DEVICE 

Wrong device at I2C (TWI) address.

DRV_ACC_STATUS_UNINITALIZED 

The driver is unitialized, please initialize.

Function Documentation

ret_code_t drv_acc_init ( drv_acc_cfg_t const *const  p_cfg)

Accelerometer driver initialization.

Parameters
[in]p_cfgInitialization struct.
Return values
DRV_ACC_STATUS_CODE_SUCCESS
DRV_ACC_STATUS_WRONG_DEVICE
NRF_ERROR_NULL
Returns
Other codes from the underlying drivers.
ret_code_t drv_acc_wakeup_prepare ( bool  p_wakeup)

Prepare for sleep and subsequent wakeup.

Parameters
[in]p_wakeupIf false, go to deepest sleep and do not prepare to wake up the system.
Note
When the nRF prepares for sleep, the LIS3DH will wake up.
Return values
DRV_ACC_STATUS_CODE_SUCCESS
DRV_ACC_STATUS_CODE_INVALID_PARAM
DRV_ACC_STATUS_UNINITALIZED
Returns
Other codes from the underlying drivers.