資源簡介
使用STM32F407驅動OV2640,每隔30秒向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
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????109142??2013-11-07?18:54??STM32F407+OV2640+ONENET\CORE\core_cm4.h
?????文件??????22735??2013-11-07?18:54??STM32F407+OV2640+ONENET\CORE\core_cm4_simd.h
?????文件??????17146??2014-07-17?21:52??STM32F407+OV2640+ONENET\CORE\core_cmFunc.h
?????文件??????20513??2014-07-17?21:52??STM32F407+OV2640+ONENET\CORE\core_cmInstr.h
?????文件??????29607??2014-10-25?11:12??STM32F407+OV2640+ONENET\CORE\startup_stm32f40_41xxx.s
?????文件??????36825??2017-01-25?20:42??STM32F407+OV2640+ONENET\EDP\cJSON.c
?????文件???????7526??2017-01-25?20:42??STM32F407+OV2640+ONENET\EDP\cJSON.h
?????文件????????553??2017-01-25?20:42??STM32F407+OV2640+ONENET\EDP\Common.h
?????文件??????33095??2017-01-25?20:42??STM32F407+OV2640+ONENET\EDP\EdpKit.c
?????文件??????14612??2017-01-25?20:42??STM32F407+OV2640+ONENET\EDP\EdpKit.c.pre
?????文件??????27898??2017-01-25?20:42??STM32F407+OV2640+ONENET\EDP\edpkit.h
?????文件???????6924??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\misc.h
?????文件??????32880??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_adc.h
?????文件??????27318??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_can.h
?????文件???????2416??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_crc.h
?????文件??????14481??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_cryp.h
?????文件??????14946??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_dac.h
?????文件???????4296??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_dbgmcu.h
?????文件??????12977??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_dcmi.h
?????文件??????28882??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_dma.h
?????文件??????19692??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_dma2d.h
?????文件???????8012??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_exti.h
?????文件??????24467??2014-08-04?22:05??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_flash.h
?????文件???????3275??2014-08-04?22:05??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_flash_ramfunc.h
?????文件??????44924??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_fmc.h
?????文件??????27181??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_fsmc.h
?????文件??????23548??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_gpio.h
?????文件??????10084??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_hash.h
?????文件??????31939??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_i2c.h
?????文件???????4323??2014-08-01?23:18??STM32F407+OV2640+ONENET\FWLIB\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_iwdg.h
............此處省略417個文件信息
評論
共有 條評論