Low power accelerometer driver API.
More...
Low power accelerometer driver API.
◆ anonymous enum
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.
|
◆ drv_acc_init()
Function for initializing the accelerometer driver.
- Parameters
-
[in] | p_cfg | Initialization struct. |
- Return values
-
DRV_ACC_STATUS_CODE_SUCCESS | |
DRV_ACC_STATUS_WRONG_DEVICE | |
NRF_ERROR_NULL | |
- Returns
- Other codes from the underlying drivers.
◆ drv_acc_wakeup_prepare()
ret_code_t drv_acc_wakeup_prepare |
( |
bool |
p_wakeup | ) |
|
Function for preparing for sleep and subsequent wakeup.
- Parameters
-
[in] | p_wakeup | If 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.