2016-12-22 微信硬件 微信蓝牙外设协议1.0.4 MmBp_Embedded_1.0.4移植记录一
2016-12-22 16:45
561 查看
//======================================================================================================== /*版权声明:本文为樱桃BLE原创文章,Q群:376066563 转载请注明出处*/ /*2016-12-22 微信硬件 微信蓝牙外设协议1.0.4 MmBp_Embedded_1.0.4移植记录一*/ /* IAR版本 IAR9.30.3 BLE栈版本 BLE-CC254x-1.4.2.2 微信协议版本微信蓝牙外设协议1.0.4 MmBp_Embedded_1.0.4 */ /*protobuf移植记录及详解*/ /*例程为 BLE-CC254x-1.4.2.2\Projects\ble\SimpleBLEPeripheral*/ /* 第一步 增加group组 MmBp_Embedded_1.0.4\protobuf 到CC2541工程,增加protobu下的三个C文件到工程 */ /* 第二步 打开编译器 C/C++cOMPLIER Preprocessor选项,增加两条记录 $PROJ_DIR$\..\..\SimpleBLEPeripheral\Source\MmBp_Embedded_1.0.4\protobuf $PROJ_DIR$\..\..\SimpleBLEPeripheral\Source */ /* 第三步:定义头文件 main.h 存放到 BLE-CC254x-1.4.2.2\Projects\ble\SimpleBLEPeripheral\Source 目录中 //======================================================================================================== #ifndef __main_h #define __main_h //======================================================================================================== /*以下头文件以及重定义替换 头文件 #include <stdint.h>*/ #include "hal_types.h" typedef signed char int8_t; //!< Signed 8 bit integer typedef unsigned char uint8_t; //!< Unsigned 8 bit integer typedef signed short int16_t; //!< Signed 16 bit integer typedef unsigned short uint16_t; //!< Unsigned 16 bit integer typedef signed long int32_t; //!< Signed 32 bit integer typedef unsigned long uint32_t; //!< Unsigned 32 bit integer /*结束头文件 头文件 #include <stdint.h> 替换*/ //======================================================================================================== //======================================================================================================== #endif */ /* 第四步 打开epb.h 用头文件 #include "main.h" 替换掉头文件 #include <stdint.h> 打开epb_MmBp.h 用头文件 #include "main.h" 替换掉头文件 #include <stdint.h> */ /* 第五步重新编译查看是否通过,没通过请核对协议栈版本以及IAR版本 */ /*版权声明:本文为樱桃BLE原创文章,Q群:376066563 转载请注明出处*/ //======================================================================================================== /* 文件解释 epb.h 打包解包工具protobufC代码 解包初始化 void epb_unpack_init(Epb *e, const uint8_t *buf, int len); 打包初始化 void epb_pack_init(Epb *e, uint8_t *buf, int len); 打包数据大小 int epb_get_packed_size(Epb *e); epb_MmBp.h 打包解包工具微信相关protobuf代码 epb_WristBand.h 打包解包微信RTC时间相关代码 */ //========================================================================================================
相关文章推荐
- 微信蓝牙外设协议 1
- 2016-12-23 微信硬件 ble_wechat_util.h移植记录二
- 微信蓝牙外设协议 1
- [置顶] 微信硬件蓝牙扫描绑定JSAPI发送数据
- 微信硬件蓝牙开发教程之添加蓝牙设备(1)
- [蓝牙] 1、蓝牙核心技术了解(蓝牙协议、架构、硬件和软件笔记)
- 蓝牙核心技术了解(蓝牙协议、架构、硬件和软件笔记)
- 微信硬件设备接入接口协议
- 微信硬件平台蓝牙打印机
- 微信硬件蓝牙开发指南
- 基于SPP协议,通过iphone蓝牙与经过苹果MFI授权认证的硬件通讯,传输图片
- 微信硬件蓝牙设备开发之设备解绑(13)
- 蓝牙核心协议,芯片结构,源码和移植
- 微信硬件蓝牙开发各种坑不完全开发指南
- 微信硬件平台蓝牙设备开发(一)
- 转载微信硬件蓝牙开发各种坑不完全开发指南
- 微信硬件设备接入接口协议
- 蓝牙核心协议,芯片结构,源码和移植 .
- Protocol buffer序列化及其在微信蓝牙协议中的应用
- 以蓝牙开发的视觉解读微信Airsync协议