Go to the documentation of this file.
67 #include "custom_config.h"
75 #define WECHAT_CONNECTION_MAX (10 < CFG_MAX_CONNECTIONS ?\
76 10 : CFG_MAX_CONNECTIONS)
77 #define WECHAT_DATA_LEN 20
78 #define WECHAT_PEDO_TARGET_VAL_LEN 0x04
79 #define WECHAT_PEDO_STEP_COUNT_MAX 0xFFFFFF
86 #define WECHAT_SERVICE_UUID 0XFEE7
87 #define WECHAT_WRITE_CHAR_UUID 0XFEC7
88 #define WECHAT_INDICATE_CHAR_UUID 0XFEC8
89 #define WECHAT_READ_CHAR_UUID 0XFEC9
90 #define WECHAT_PEDOMETER_MEASUREMENT 0XFEA1
91 #define WECHAT_TARGET 0XFEA2
99 #define WECHAT_PEDO_FLAG_STEP_COUNT_BIT 0X01
100 #define WECHAT_PEDO_FLAG_STEP_DISTENCE_BIT 0X02
101 #define WECHAT_PEDO_FLAG_STEP_CALORIE_BIT 0X04
102 #define WECHAT_PEDO_FLAG_ALL_SUP_BIT 0X07
133 uint8_t step_count[3];
134 uint8_t step_dist[3];
135 uint8_t step_calorie[3];
142 uint8_t step_count[3];
@ WECHAT_EVT_INVALID
Definition: wechat.h:113
void(* wechat_evt_handler_t)(wechat_evt_t *p_evt)
WeChat Service event handler type.
Definition: wechat.h:171
sdk_err_t wechat_pedo_measurement_send(uint8_t conn_idx, wechat_pedo_meas_t *p_pedo_meas)
Send WeChat pedometer measurement information.
@ WECHAT_EVT_PEDO_MEAS_NTF_ENABLE
Definition: wechat.h:116
uint8_t * p_dev_mac
Definition: wechat.h:183
sdk_err_t wechat_pedo_target_send(uint8_t conn_idx)
Send WeChat pedometer target value.
uint32_t step_count_target
Definition: wechat.h:182
@ WECHAT_EVT_PEDO_MEAS_NTF_DISABLE
Definition: wechat.h:117
wechat_pedo_target_t pedo_target
Definition: wechat.h:160
wechat_data_t data
Definition: wechat.h:161
WeChat Service event.
Definition: wechat.h:155
@ WECHAT_EVT_AIRSYNC_IND_DISABLE
Definition: wechat.h:115
const uint8_t * p_data
Definition: wechat.h:148
uint16_t length
Definition: wechat.h:149
@ WECHAT_EVT_PEDO_TARGET_IND_ENABLE
Definition: wechat.h:118
WeChat pedometer target variable.
Definition: wechat.h:140
wechat_evt_type_t
WeChat Service event type.
Definition: wechat.h:112
WeChat Service Init variable.
Definition: wechat.h:180
@ WECHAT_EVT_PEDO_TARGET_IND_DISABLE
Definition: wechat.h:119
uint8_t flag
Definition: wechat.h:132
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243
@ WECHAT_EVT_AIRSYNC_IND_ENABLE
Definition: wechat.h:114
sdk_err_t wechat_service_init(wechat_init_t *p_wechat_init)
Initialize a WeChat Service instance and add in the DB.
WeChat service data.
Definition: wechat.h:147
sdk_err_t wechat_airsync_data_indicate(uint8_t conn_idx, uint8_t *p_data, uint16_t length)
WeChat Service Airsync indicate data.
wechat_evt_type_t evt_type
Definition: wechat.h:157
uint8_t flag
Definition: wechat.h:141
WeChat current pedometer measurement variable.
Definition: wechat.h:131
wechat_evt_handler_t evt_handler
Definition: wechat.h:181
@ WECHAT_EVT_AIRSYNC_DATA_RECIEVE
Definition: wechat.h:121
uint8_t conn_idx
Definition: wechat.h:156
@ WECHAT_EVT_PEDO_TARGET_UPDATE
Definition: wechat.h:120
uint16_t offset
Definition: wechat.h:150