1.具体使用方法可参考:sample.c
SDK使用的三种类型:
1.组包-发送-删包
只需要调用接口函数封装一包数据,成发送即可。
2.组包-发送-等待平台返回-删包
连接平台和心跳请求需要等待平台的返回结果。
3.数据点上传
数据点上传分5步:1.获取json格式数据流长度
2.根据长度封装协议头
3.封装一包数据
4.发送数据
5.释放内存
内存方案的三种方式
1.动态分配
只需要声明 EDP_PACKET_STRUCTURE edpPacket = {NULL, 0, 0, 0};
然后调用组包函数即可。
2.全局数
声明一个全局数组,如 unsigned char dataMem[128]
然后再调用组包函数之前
edpPacket._data = dataMem;
edpPacket._len = sizeof(dataMem);
即可。
3.局部数组
方式同2,数组为局部变量。
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
M6312-MQTT_TYPE1-三轴加速计.rar (86个子文件)
M6312-MQTT_TYPE1-三轴加速计
使用说明.txt 41B
listing
keilkilll.bat 399B
output
stm32f103.hex 72KB
core
stm32f10x_conf.h 3KB
core_cm3.h 84KB
stm32f10x.h 619KB
stm32f10x_it.c 7KB
system_stm32f10x.c 36KB
core_cm3.c 17KB
system_stm32f10x.h 2KB
stm32f10x_it.h 2KB
startup
arm
startup_stm32f10x_md_vl.s 14KB
startup_stm32f10x_hd.s 15KB
startup_stm32f10x_ld.s 12KB
startup_stm32f10x_xl.s 16KB
startup_stm32f10x_cl.s 15KB
startup_stm32f10x_hd_vl.s 15KB
startup_stm32f10x_ld_vl.s 13KB
startup_stm32f10x_md.s 12KB
stm32f103.uvproj 19KB
user
main.c 3KB
fwlib
inc
stm32f10x_bkp.h 7KB
stm32f10x_usart.h 16KB
stm32f10x_exti.h 7KB
stm32f10x_pwr.h 4KB
stm32f10x_gpio.h 20KB
stm32f10x_dac.h 15KB
stm32f10x_i2c.h 29KB
stm32f10x_sdio.h 21KB
stm32f10x_rcc.h 30KB
stm32f10x_cec.h 6KB
stm32f10x_dma.h 20KB
stm32f10x_dbgmcu.h 4KB
stm32f10x_crc.h 2KB
stm32f10x_rtc.h 4KB
stm32f10x_tim.h 51KB
stm32f10x_adc.h 21KB
stm32f10x_can.h 27KB
stm32f10x_wwdg.h 3KB
stm32f10x_fsmc.h 26KB
misc.h 9KB
stm32f10x_iwdg.h 4KB
stm32f10x_spi.h 17KB
stm32f10x_flash.h 25KB
src
stm32f10x_dac.c 19KB
stm32f10x_flash.c 61KB
stm32f10x_rtc.c 8KB
stm32f10x_pwr.c 9KB
stm32f10x_sdio.c 28KB
stm32f10x_rcc.c 50KB
stm32f10x_iwdg.c 5KB
stm32f10x_i2c.c 45KB
stm32f10x_wwdg.c 6KB
stm32f10x_bkp.c 8KB
stm32f10x_exti.c 7KB
stm32f10x_tim.c 107KB
stm32f10x_dbgmcu.c 5KB
stm32f10x_dma.c 29KB
stm32f10x_spi.c 30KB
stm32f10x_can.c 44KB
stm32f10x_fsmc.c 35KB
stm32f10x_crc.c 3KB
misc.c 7KB
stm32f10x_cec.c 11KB
stm32f10x_adc.c 46KB
stm32f10x_usart.c 37KB
stm32f10x_gpio.c 23KB
NET
device
inc
m6312.h 307B
src
m6312.c 7KB
onenet
inc
onenet.h 163B
src
onenet.c 6KB
MQTT
MqttKit.c 34KB
sample.c 15KB
Common.h 568B
SDK使用说明.txt 680B
MqttKit.h 7KB
hardware
inc
ADXL362.h 11KB
beep.h 255B
usart.h 365B
spi.h 368B
delay.h 195B
src
usart.c 6KB
ADXL362.c 20KB
beep.c 2KB
delay.c 3KB
spi.c 7KB
共 86 条
- 1
资源评论
- stm32f42018-09-23谢谢分享!
ojylijia
- 粉丝: 7
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功