Inertial Measurement Unit GATT Service#

Provides inertial measurement unit sensor data in GATT characteristics. Designed for the Thunderboard smartphone app.

Functions#

void
sl_status_t
sl_gatt_service_imu_get(int16_t ovec[3], int16_t avec[3])

Function Documentation#

sl_gatt_service_imu_on_event#

void sl_gatt_service_imu_on_event (sl_bt_msg_t * evt)
Parameters
[in]evt

Event coming from the Bluetooth stack.

Bluetooth stack event handler.


Definition at line 45 of file common/gatt_service_imu/sl_gatt_service_imu.h

sl_gatt_service_imu_step#

void sl_gatt_service_imu_step (void )
Parameters
N/A

IMU GATT service event handler.


Definition at line 50 of file common/gatt_service_imu/sl_gatt_service_imu.h

sl_gatt_service_imu_get#

sl_status_t sl_gatt_service_imu_get (int16_t ovec, int16_t avec)
Parameters
[out]ovec

Three dimensional orientation vector (in 0.01 degree).

[out]avec

Three dimensional acceleration vector.

Getter for Orientation and Acceleration characteristic values. Returns

  • Status of the operation.

Note

  • To be implemented in user code.


Definition at line 59 of file common/gatt_service_imu/sl_gatt_service_imu.h

sl_gatt_service_imu_calibrate#

sl_status_t sl_gatt_service_imu_calibrate (void )
Parameters
N/A

Called when a calibration was requested by the GATT client. Returns

  • Status of the operation.

Note

  • To be implemented in user code.


Definition at line 66 of file common/gatt_service_imu/sl_gatt_service_imu.h

sl_gatt_service_imu_enable#

void sl_gatt_service_imu_enable (bool enable)
Parameters
[in]enable

(true) or disable (false).

Enable/disable IMU sensor. Note

  • To be implemented in user code.


Definition at line 73 of file common/gatt_service_imu/sl_gatt_service_imu.h

Macro Definition Documentation#

SL_GATT_SERVICE_IMU_OVEC_INVALID#

#define SL_GATT_SERVICE_IMU_OVEC_INVALID
Value:
0x7FFF

Definition at line 43 of file common/gatt_service_imu/config/sl_gatt_service_imu_config.h

SL_GATT_SERVICE_IMU_AVEC_INVALID#

#define SL_GATT_SERVICE_IMU_AVEC_INVALID
Value:
0x7FFF

Definition at line 47 of file common/gatt_service_imu/config/sl_gatt_service_imu_config.h