Smart Remote 3 nRF52 v1.2
Typedefs | Functions
Gyro driver

Gyro driver API. More...

Typedefs

typedef void(* drv_gyro_read_handler_t )(ret_code_t status, t_struct_AIR_MOTION_ProcessDeltaSamples *p_samples)
 Gyroscope read data handler.
 
typedef void(* drv_gyro_ready_handler_t )(void)
 Gyroscope enabled handler.
 

Functions

ret_code_t drv_gyro_disable (void)
 Turns the gyroscope off. More...
 
ret_code_t drv_gyro_enable (void)
 Turns the gyroscope on. More...
 
ret_code_t drv_gyro_init (drv_gyro_ready_handler_t ready_handler, drv_gyro_read_handler_t read_handler)
 Initializes gyroscope chip and driver. More...
 
ret_code_t drv_gyro_schedule_read (t_struct_AIR_MOTION_ProcessDeltaSamples *p_samples)
 Schedules a gyroscope read. More...
 

Detailed Description

Gyro driver API.

Function Documentation

ret_code_t drv_gyro_disable ( void  )

Turns the gyroscope off.

Returns
NRF_SUCCESS if the switch-off request was successfully registered. Otherwise an error code.
ret_code_t drv_gyro_enable ( void  )

Turns the gyroscope on.

Returns
NRF_SUCCESS if the switch-on request was successfully registered. Otherwise an error code.
ret_code_t drv_gyro_init ( drv_gyro_ready_handler_t  ready_handler,
drv_gyro_read_handler_t  read_handler 
)

Initializes gyroscope chip and driver.

Parameters
[in]ready_handlerHandler triggered when driver is ready for operation.
[in]read_handlerHandler for data read from the gyroscope.
Returns
NRF_SUCCESS on success, otherwise an error code.
ret_code_t drv_gyro_schedule_read ( t_struct_AIR_MOTION_ProcessDeltaSamples *  p_samples)

Schedules a gyroscope read.

Parameters
[out]p_samplesPointer to the structure that will be filled up by data.
Returns
NRF_SUCCESS if the read request was successfully registered. Otherwise an error code.

Documentation feedback | Developer Zone | Subscribe | Updated