资源简介
基于stm32的esp8266上传数据到移动onenet平台。
代码片段和文件信息
/*
Copyright (c) 2009 Dave Gamble
Permission is hereby granted free of charge to any person obtaining a copy
of this software and associated documentation files (the “Software“) to deal
in the Software without restriction including without limitation the rights
to use copy modify merge publish distribute sublicense and/or sell
copies of the Software and to permit persons to whom the Software is
furnished to do so subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* cJSON */
/* JSON parser in C. */
#include
#include
#include
#include
#include
#include
#include
#include “cJSON.h“
static const char *ep;
const char *cJSON_GetErrorPtr(void)
{
return ep;
}
static int cJSON_strcasecmp(const char *s1 const char *s2)
{
if (!s1) return (s1 == s2) ? 0 : 1;
if (!s2) return 1;
for(; tolower(*s1) == tolower(*s2); ++s1 ++s2) if(*s1 == 0) return 0;
return tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2);
}
static void *(*cJSON_malloc)(size_t sz) = malloc;
static void (*cJSON_free)(void *ptr) = free;
static char* cJSON_strdup(const char* str)
{
size_t len;
char* copy;
len = strlen(str) + 1;
copy = (char*)cJSON_malloc(len);
if (!copy) return 0;
memcpy(copy str len);
return copy;
}
void cJSON_InitHooks(cJSON_Hooks* hooks)
{
if (!hooks) /* Reset hooks */
{
cJSON_malloc = malloc;
cJSON_free = free;
return;
}
cJSON_malloc = (hooks->malloc_fn) ? hooks->malloc_fn : malloc;
cJSON_free = (hooks->free_fn) ? hooks->free_fn : free;
}
/* Internal constructor. */
static cJSON *cJSON_New_Item(void)
{
cJSON* node = (cJSON*)cJSON_malloc(sizeof(cJSON));
if (node) memset(node 0 sizeof(cJSON));
return node;
}
/* Delete a cJSON structure. */
void cJSON_Delete(cJSON *c)
{
cJSON *next;
while (c)
{
next = c->next;
if (!(c->type & cJSON_IsReference) && c->child) cJSON_Delete(c->child);
if (!(c->type & cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring);
if (!(c->type & cJSON_StringIsConst) && c->string) cJSON_free(c->string);
cJSON_free(c);
c = next;
}
}
/* Parse the input text to generate a number and populate the result into item. */
static const char *parse_number(cJSON *it
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-06-30 14:29 上传数据onenet\
目录 0 2016-07-01 15:43 上传数据onenet\printf(interrupt)\
目录 0 2016-06-30 14:16 上传数据onenet\printf(interrupt)\Doc\
文件 0 2013-03-18 19:46 上传数据onenet\printf(interrupt)\Doc\readme.txt
目录 0 2016-07-02 13:06 上传数据onenet\printf(interrupt)\EDP\
文件 36825 2016-06-01 18:46 上传数据onenet\printf(interrupt)\EDP\cJSON.c
文件 7526 2016-06-01 18:46 上传数据onenet\printf(interrupt)\EDP\cJSON.h
文件 553 2016-06-01 18:46 上传数据onenet\printf(interrupt)\EDP\Common.h
文件 31030 2016-07-02 13:06 上传数据onenet\printf(interrupt)\EDP\EdpKit.c
文件 14612 2016-06-01 18:46 上传数据onenet\printf(interrupt)\EDP\EdpKit.c.pre
文件 26979 2016-06-01 18:46 上传数据onenet\printf(interrupt)\EDP\edpkit.h
文件 399 2011-05-09 18:17 上传数据onenet\printf(interrupt)\keilkill.bat
目录 0 2016-06-30 14:16 上传数据onenet\printf(interrupt)\Libraries\
目录 0 2016-06-30 14:16 上传数据onenet\printf(interrupt)\Libraries\CMSIS\
文件 17273 2010-06-07 10:25 上传数据onenet\printf(interrupt)\Libraries\CMSIS\core_cm3.c
文件 85714 2011-02-09 14:59 上传数据onenet\printf(interrupt)\Libraries\CMSIS\core_cm3.h
目录 0 2016-06-30 14:16 上传数据onenet\printf(interrupt)\Libraries\CMSIS\startup\
文件 15766 2011-03-10 10:52 上传数据onenet\printf(interrupt)\Libraries\CMSIS\startup\startup_stm32f10x_cl.s
文件 15503 2011-03-10 10:52 上传数据onenet\printf(interrupt)\Libraries\CMSIS\startup\startup_stm32f10x_hd.s
文件 15692 2011-03-10 10:52 上传数据onenet\printf(interrupt)\Libraries\CMSIS\startup\startup_stm32f10x_hd_vl.s
文件 12376 2011-03-10 10:52 上传数据onenet\printf(interrupt)\Libraries\CMSIS\startup\startup_stm32f10x_ld.s
文件 13656 2011-03-10 10:52 上传数据onenet\printf(interrupt)\Libraries\CMSIS\startup\startup_stm32f10x_ld_vl.s
文件 12765 2011-03-10 10:52 上传数据onenet\printf(interrupt)\Libraries\CMSIS\startup\startup_stm32f10x_md.s
文件 14073 2011-03-10 10:51 上传数据onenet\printf(interrupt)\Libraries\CMSIS\startup\startup_stm32f10x_md_vl.s
文件 15955 2011-03-10 10:51 上传数据onenet\printf(interrupt)\Libraries\CMSIS\startup\startup_stm32f10x_xl.s
文件 633941 2011-03-10 10:51 上传数据onenet\printf(interrupt)\Libraries\CMSIS\stm32f10x.h
文件 36557 2011-03-10 10:51 上传数据onenet\printf(interrupt)\Libraries\CMSIS\system_stm32f10x.c
文件 2085 2011-03-10 10:51 上传数据onenet\printf(interrupt)\Libraries\CMSIS\system_stm32f10x.h
目录 0 2016-06-30 14:16 上传数据onenet\printf(interrupt)\Libraries\FWlib\
目录 0 2016-06-30 14:16 上传数据onenet\printf(interrupt)\Libraries\FWlib\inc\
文件 8982 2011-03-10 10:47 上传数据onenet\printf(interrupt)\Libraries\FWlib\inc\misc.h
............此处省略182个文件信息
相关资源
- STM32定时器产生PWM波控制电机寄存器版
- INA226硬件IICSTM32F4驱动.7z
- 基于stm32f103vc的超声波测距
- STM32 语音模块资料
- MS5837水深传感器-stm32程序源码
- STM32F103 SX1278通讯程序
- STM32F103C8T6定时器秒表TM1650显示.rar
- ULN2003驱动28BYJ-48步进电机STM32F103库函
- stm32sk6812灯带
- stm32+ov7670+颜色识别追踪
- STM32F0工程模板
- 基于STM32室内温度报警控制系统设计
- STM32F103串口使用空闲IDLE中断接收不定
- STM32+USB+W25Q实现U盘程序
- BQ40Z50通讯正常-基于STM32F0.rar
- 基于STM32单片机的窗帘自动控制系统设
- STM32_ADC+TIM+DMA
- lsm303dlhc Stm32f103 驱动程序
- 基于MQ135+STM32的环境空气质量检测
- STM32编码器程序
- OneNET平台TCP透传接入开发文档V2.0
- ARM stm32f407 开发板原理图及 PCB图
- STM32驱动12864点阵LCD,多级菜单,完整
- 基于LABVIEW的STM32F0多路数据采集系统源
- STM32红外遥控解码程序解码后的按键值
- STM32升降桌控制霍尔电机,PID调速
- STM32F103R LCD显示汉字.rar
- stm32f103zet6矩阵键盘(4x4)实现数字密
- stm32f072 can 通讯代码
- STM32Mini开发板HCSR-04C超声波程序
评论
共有 条评论