Nordic Thingy:52 v2.2.0
Motion sensor

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 for configuring the motion driver. More...
 
uint32_t drv_motion_disable (drv_motion_feature_mask_t feature_mask)
 Function for disabling 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 for preparing for sleep mode. More...
 

Detailed Description

Motion sensor API.

Function Documentation

◆ drv_motion_config()

uint32_t drv_motion_config ( drv_motion_cfg_t p_cfg)

Function for configuring the motion driver.

Parameters
[in]p_cfgConfiguration structure.
Return values
NRF_SUCCESS.

◆ drv_motion_disable()

uint32_t drv_motion_disable ( drv_motion_feature_mask_t  feature_mask)

Function for disabling features in the motion driver.

Parameters
[in]feature_maskFeature mask indicating what features to disable.
Return values
NRF_SUCCESS.

◆ drv_motion_enable()

uint32_t drv_motion_enable ( drv_motion_feature_mask_t  feature_mask)

Function for enabling features in the motion driver.

Parameters
[in]feature_maskFeature mask indicating what features to enable.
Return values
NRF_SUCCESS.

◆ drv_motion_init()

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.

Parameters
[in]evt_handlerThe motion event handler.
[in]p_params_mpuPointer to the init parameter structure for the MPU9250.
[in]p_params_lisPointer to the init parameter structure for the LIS2DH12.
Return values
NRF_SUCCESS.

◆ drv_motion_sleep_prepare()

uint32_t drv_motion_sleep_prepare ( bool  wakeup)

Function for preparing for sleep mode.

Parameters
[in]wakeupBoolean indicating either wakeup or sleep forever.
Return values
NRF_SUCCESS.