Nordic Thingy:52
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
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 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...
 

Detailed Description

Motion sensor API.

Function Documentation

uint32_t drv_motion_config ( drv_motion_cfg_t p_cfg)

Function to configure the motion driver.

Parameters
[in]cfgConfiguration structure.
Return values
NRF_SUCCESS.
uint32_t drv_motion_disable ( drv_motion_feature_mask_t  feature_mask)

Function to disable features in the motion driver.

Parameters
[in]feature_maskFeature mask telling what features to disable.
Return values
NRF_SUCCESS.
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 telling what features to enable.
Return values
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.

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.
uint32_t drv_motion_sleep_prepare ( bool  wakeup)

Function to prepare for sleep mode.

Parameters
[in]wakeupBoolean indicating wakeup or sleep for ever.
Return values
NRF_SUCCESS.