component bt: added the WX_AIRSYNC_CFG macro to control the wechat profile

pull/111/merge
yulong 2016-10-16 23:54:22 -04:00
rodzic 1a08abea78
commit 7cb55c2c6c
16 zmienionych plików z 99 dodań i 8 usunięć

Wyświetl plik

@ -26,7 +26,7 @@
#define ATT_UUID_128_LEN 0x0010
#define ATT_UUID_32_LEN 0x0004
#define WX_AIRSYNC_CFG 1
#define WX_AIRSYNC_CFG 0
#define BUT_PROFILE_CFG 0
#define HIDD_LE_PROFILE_CFG 1

Wyświetl plik

@ -11,7 +11,10 @@
****************************************************************************************
*/
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
@ -122,3 +125,6 @@ int32_t wechat_md5 (char *argv, uint8_t *md5_32)
}
#endif ///WX_AIRSYNC_CFG

Wyświetl plik

@ -11,6 +11,9 @@
****************************************************************************************
*/
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include "app_airsync_prf.h"
#include "wx_airsync_prf.h"
#include "app_wechat_util.h"
@ -152,3 +155,6 @@ data_handler *app_wechat_datahandler(void)
return pDataHandler;
}
#endif ///WX_AIRSYNC_CFG

Wyświetl plik

@ -7,6 +7,10 @@
// Version : 1.0.2
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include <string.h>
#include "epb.h"
@ -406,3 +410,5 @@ int epb_length_delimited_pack_size(uint16_t tag, int len)
return epb_varint32_pack_size(tag, len, false) + len;
}
#endif ///WX_AIRSYNC_CFG

Wyświetl plik

@ -7,6 +7,10 @@
// Version : 1.0.4
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -557,3 +561,5 @@ void epb_unpack_switch_backgroud_push_free(SwitchBackgroudPush *push)
GKI_freebuf(push);
}
#endif ///WX_AIRSYNC_CFG

Wyświetl plik

@ -4,6 +4,11 @@
* author by anqiren 2014/12/02 V1.0bat
*
**/
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
@ -577,3 +582,5 @@ int32_t mpbledemo2_sendData(uint8_t* ptrData, uint32_t lengthInByte)
return 0;
}
#endif ///WX_AIRSYNC_CFG

Wyświetl plik

@ -5,6 +5,10 @@
// Copyright 2014 Tencent. All rights reserved.
//
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include <stdio.h>
#include "wechar_crc.h"
@ -42,3 +46,6 @@ uint32_t crc32(uint32_t crc, const uint8_t *buf, int len)
return crc ^ 0xffffffffL;
}
#endif ///WX_AIRSYNC_CFG

Wyświetl plik

@ -4,6 +4,10 @@
// 创 建 人Liangbofu
// 创建日期2009-07-17
///////////////////////////////////////////////////////////////////////////////
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include "wechat_aes.h"
#include <string.h>
#include <stdlib.h>
@ -441,3 +445,6 @@ void AES_Decrypt(unsigned char *pPlainText, const unsigned char *pCipherText,
}
}
#endif ///WX_AIRSYNC_CFG

Wyświetl plik

@ -14,6 +14,10 @@
#ifndef __APP_AIRSYNC_MD5__
#define __APP_AIRSYNC_MD5__
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@ -41,6 +45,7 @@ typedef struct
int32_t wechat_md5 ( char *argv, uint8_t *md5_32);
#endif ///WX_AIRSYNC_CFG
#endif /// __APP_AIRSYNC_MD5__

Wyświetl plik

@ -13,6 +13,10 @@
#ifndef _APP_AIRSYNC_PRF_H__
#define _APP_AIRSYNC_PRF_H__
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include "app_wechat_util.h"
#include <stdint.h>
#include <stdbool.h>
@ -35,6 +39,8 @@ data_handler* app_wechat_datahandler(void);
bool ble_wechat_is_last_data_sent_out(void);
#endif ///WX_AIRSYNC_CFG
#endif ///_APP_AIRSYNC_PRF_H__

Wyświetl plik

@ -1,6 +1,8 @@
#ifndef __APP_WECHAT_UTIL_H__
#define __APP_WECHAT_UTIL_H__
#include "prf_defs.h"
if (WX_AIRSYNC_CFG)
#include <stdint.h>
#include <string.h>
@ -77,5 +79,7 @@ unsigned long t_ntohl(unsigned long n);
void wechat_error_chack(data_handler *p_data_handler, int error_code);
void data_handler_init(data_handler** p_data_handler, uint8_t product_type);
#endif ///WX_AIRSYNC_CFG
#endif ///__APP_WECHAT_UTIL_H__

Wyświetl plik

@ -10,6 +10,10 @@
#ifndef __EPB_H__
#define __EPB_H__
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include <stdint.h>
#include <stdbool.h>
@ -106,5 +110,8 @@ int epb_varint32_pack_size(uint16_t tag, uint32_t value, bool is_signed);
int epb_fixed32_pack_size(uint16_t tag);
int epb_length_delimited_pack_size(uint16_t tag, int len);
#endif
#endif ///WX_AIRSYNC_CFG
#endif ///__EPB_H__

Wyświetl plik

@ -10,6 +10,10 @@
#ifndef __EPB_MMBP_H__
#define __EPB_MMBP_H__
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include "epb.h"
typedef enum
@ -237,5 +241,8 @@ void epb_unpack_switch_view_push_free(SwitchViewPush *push);
SwitchBackgroudPush *epb_unpack_switch_backgroud_push(const uint8_t *buf, int buf_len);
void epb_unpack_switch_backgroud_push_free(SwitchBackgroudPush *push);
#endif
#endif ///WX_AIRSYNC_CFG
#endif ///__EPB_MMBP_H__

Wyświetl plik

@ -2,6 +2,11 @@
#ifndef __MPBLEDEMO2_H__
#define __MPBLEDEMO2_H__
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
@ -128,5 +133,8 @@ extern void mpbledemo2_reset(void);
extern void mpbledemo2_indication_state(bool isEnable);
extern int32_t mpbledemo2_sendData(uint8_t* ptrData, uint32_t lengthInByte);
#endif
#endif ///WX_AIRSYNC_CFG
#endif ///__MPBLEDEMO2_H__

Wyświetl plik

@ -8,6 +8,10 @@
#ifndef __CRC32_H__
#define __CRC32_H__
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include <stdint.h>
#ifdef __cplusplus
@ -17,8 +21,9 @@ uint32_t crc32(uint32_t crc, const uint8_t *buf, int len);
#ifdef __cplusplus
}
#endif
#endif ///__cplusplus
#endif ///WX_AIRSYNC_CFG
#endif
#endif ///__CRC32_H__

Wyświetl plik

@ -7,6 +7,9 @@
#ifndef __WECHAT_AES_H
#define __WECHAT_AES_H
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#ifdef __cplusplus
extern "C" {
#endif
@ -62,8 +65,9 @@ unsigned int AES_get_length(unsigned int length);
void AES_free(unsigned char* p);
#ifdef __cplusplus
}
#endif
#endif ///__cplusplus
#endif ///WX_AIRSYNC_CFG
#endif // __WECHAT_AES_H