Nordic Thingy:52
|
Motion sensor API. More...
Modules | |
MPU-9250 motion sensor | |
MPU-9250 motion sensor. | |
Data Structures | |
struct | drv_motion_cfg_t |
Motion configuration struct. More... | |
struct | drv_motion_twi_init_t |
Motion initialization struct. More... | |
Typedefs | |
typedef void(* | drv_motion_evt_handler_t )(drv_motion_evt_t const *p_evt, void *p_data, uint32_t size) |
Motion driver event handler callback type. | |
Enumerations | |
enum | drv_motion_evt_t |
Motion event types. | |
enum | drv_motion_feature_t |
Motion features. | |
Functions | |
uint32_t | drv_motion_config (drv_motion_cfg_t *p_cfg) |
Function to configure the motion driver. More... | |
uint32_t | drv_motion_disable (drv_motion_feature_mask_t feature_mask) |
Function to disable features in the motion driver. More... | |
uint32_t | drv_motion_enable (drv_motion_feature_mask_t feature_mask) |
Function for enabling features in the motion driver. More... | |
uint32_t | drv_motion_init (drv_motion_evt_handler_t evt_handler, drv_motion_twi_init_t *p_params_mpu, drv_motion_twi_init_t *p_params_lis) |
Function for initializing the motion driver. More... | |
uint32_t | drv_motion_sleep_prepare (bool wakeup) |
Function to prepare for sleep mode. More... | |
Motion sensor API.
uint32_t drv_motion_config | ( | drv_motion_cfg_t * | p_cfg | ) |
Function to configure the motion driver.
[in] | cfg | Configuration structure. |
NRF_SUCCESS. |
uint32_t drv_motion_disable | ( | drv_motion_feature_mask_t | feature_mask | ) |
Function to disable features in the motion driver.
[in] | feature_mask | Feature mask telling what features to disable. |
NRF_SUCCESS. |
uint32_t drv_motion_enable | ( | drv_motion_feature_mask_t | feature_mask | ) |
Function for enabling features in the motion driver.
[in] | feature_mask | Feature mask telling what features to enable. |
NRF_SUCCESS. |
uint32_t drv_motion_init | ( | drv_motion_evt_handler_t | evt_handler, |
drv_motion_twi_init_t * | p_params_mpu, | ||
drv_motion_twi_init_t * | p_params_lis | ||
) |
Function for initializing the motion driver.
[in] | evt_handler | The motion event handler. |
[in] | p_params_mpu | Pointer to the init parameter structure for the MPU9250. |
[in] | p_params_lis | Pointer to the init parameter structure for the LIS2DH12. |
NRF_SUCCESS. |
uint32_t drv_motion_sleep_prepare | ( | bool | wakeup | ) |
Function to prepare for sleep mode.
[in] | wakeup | Boolean indicating wakeup or sleep for ever. |
NRF_SUCCESS. |