62 #include "ble_srv_common.h"
63 #include "app_util_platform.h"
67 #define BLE_UUID_TMS_SERVICE 0x0400
68 #define BLE_TMS_MAX_DATA_LEN (GATT_MTU_SIZE_DEFAULT - 3)
75 #define PACKED(TYPE) TYPE __attribute__ ((packed))
78 typedef PACKED(
struct
83 }) ble_tms_raw_accel_t;
85 typedef PACKED(
struct
90 }) ble_tms_raw_gyro_t;
92 typedef PACKED(
struct
97 }) ble_tms_raw_compass_t;
99 typedef PACKED(
struct
101 ble_tms_raw_accel_t accel;
102 ble_tms_raw_gyro_t gyro;
103 ble_tms_raw_compass_t compass;
106 typedef PACKED(
struct
112 typedef uint8_t ble_tms_orientation_t;
114 typedef PACKED(
struct
122 typedef PACKED(
struct
129 typedef PACKED(
struct
132 }) ble_tms_rot_mat_t;
134 typedef int32_t ble_tms_heading_t;
136 typedef PACKED(
struct
141 }) ble_tms_gravity_t;
143 typedef PACKED(
struct
149 typedef PACKED(
struct
151 uint16_t pedo_interval_ms;
152 uint16_t temp_interval_ms;
153 uint16_t compass_interval_ms;
154 uint16_t motion_freq_hz;
155 uint8_t wake_on_motion;
158 #define BLE_TMS_CONFIG_PEDO_INT_MIN 100
159 #define BLE_TMS_CONFIG_PEDO_INT_MAX 5000
160 #define BLE_TMS_CONFIG_TEMP_INT_MIN 100
161 #define BLE_TMS_CONFIG_TEMP_INT_MAX 5000
162 #define BLE_TMS_CONFIG_COMP_INT_MIN 100
163 #define BLE_TMS_CONFIG_COMP_INT_MAX 5000
164 #define BLE_TMS_CONFIG_MPUF_MIN 1
165 #define BLE_TMS_CONFIG_MPUF_MAX 200
166 #define BLE_TMS_CONFIG_WOM_MIN 0
167 #define BLE_TMS_CONFIG_WOM_MAX 1
171 BLE_TMS_EVT_CONFIG_RECEIVED,
172 BLE_TMS_EVT_NOTIF_TAP,
173 BLE_TMS_EVT_NOTIF_ORIENTATION,
174 BLE_TMS_EVT_NOTIF_QUAT,
175 BLE_TMS_EVT_NOTIF_PEDOMETER,
176 BLE_TMS_EVT_NOTIF_RAW,
177 BLE_TMS_EVT_NOTIF_EULER,
178 BLE_TMS_EVT_NOTIF_ROT_MAT,
179 BLE_TMS_EVT_NOTIF_HEADING,
180 BLE_TMS_EVT_NOTIF_GRAVITY,
188 ble_tms_evt_type_t evt_type,
199 ble_tms_config_t * p_init_config;
357 #endif // BLE_TMS_H__