資源簡介
ESP8266開發,實現MQTT客戶端,與MQTT服務器通信,斷線重連,有軟件安裝、使用及詳細的代碼注釋,方便快速搭建自己的物聯網系統。
代碼片段和文件信息
/*
?*?ESPRESSIF?MIT?License
?*
?*?Copyright?(c)?2016?
?*
?*?Permission?is?hereby?granted?for?use?on?ESPRESSIF?SYSTEMS?ESP8266?only?in?which?case
?*?it?is?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.
?*
?*/
#include?“ets_sys.h“
#include?“osapi.h“
#include?“driver/gpio16.h“
void?ICACHE_FLASH_ATTR
gpio16_output_conf(void)
{
????WRITE_PERI_REG(PAD_XPD_DCDC_CONF
???????????????????(READ_PERI_REG(PAD_XPD_DCDC_CONF)?&?0xffffffbc)?|?(uint32)0x1);? //?mux?configuration?for?XPD_DCDC?to?output?rtc_gpio0
????WRITE_PERI_REG(RTC_GPIO_CONF
???????????????????(READ_PERI_REG(RTC_GPIO_CONF)?&?(uint32)0xfffffffe)?|?(uint32)0x0); //mux?configuration?for?out?enable
????WRITE_PERI_REG(RTC_GPIO_ENABLE
???????????????????(READ_PERI_REG(RTC_GPIO_ENABLE)?&?(uint32)0xfffffffe)?|?(uint32)0x1); //out?enable
}
void?ICACHE_FLASH_ATTR
gpio16_output_set(uint8?value)
{
????WRITE_PERI_REG(RTC_GPIO_OUT
???????????????????(READ_PERI_REG(RTC_GPIO_OUT)?&?(uint32)0xfffffffe)?|?(uint32)(value?&?1));
}
void?ICACHE_FLASH_ATTR
gpio16_input_conf(void)
{
????WRITE_PERI_REG(PAD_XPD_DCDC_CONF
???????????????????(READ_PERI_REG(PAD_XPD_DCDC_CONF)?&?0xffffffbc)?|?(uint32)0x1);? //?mux?configuration?for?XPD_DCDC?and?rtc_gpio0?connection
????WRITE_PERI_REG(RTC_GPIO_CONF
???????????????????(READ_PERI_REG(RTC_GPIO_CONF)?&?(uint32)0xfffffffe)?|?(uint32)0x0); //mux?configuration?for?out?enable
????WRITE_PERI_REG(RTC_GPIO_ENABLE
???????????????????READ_PERI_REG(RTC_GPIO_ENABLE)?&?(uint32)0xfffffffe); //out?disable
}
uint8?ICACHE_FLASH_ATTR
gpio16_input_get(void)
{
????return?(uint8)(READ_PERI_REG(RTC_GPIO_IN_DATA)?&?1);
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????427060??2018-07-26?11:03??bin\at\1024+1024\user1.2048.new.5.bin
?????文件?????427060??2018-07-26?11:03??bin\at\1024+1024\user2.2048.new.5.bin
?????文件?????427060??2018-07-26?11:03??bin\at\512+512\user1.1024.new.2.bin
?????文件?????427060??2018-07-26?11:03??bin\at\512+512\user2.1024.new.2.bin
?????文件???????2453??2018-07-26?11:03??bin\at\README.md
?????文件?????428980??2018-07-26?11:03??bin\at_sdio\1024+1024\user1.2048.new.5.bin
?????文件?????428980??2018-07-26?11:03??bin\at_sdio\1024+1024\user2.2048.new.5.bin
?????文件?????428980??2018-07-26?11:03??bin\at_sdio\512+512\user1.1024.new.2.bin
?????文件?????428980??2018-07-26?11:03??bin\at_sdio\512+512\user2.1024.new.2.bin
?????文件???????2453??2018-07-26?11:03??bin\at_sdio\README.md
?????文件???????4096??2018-07-26?11:03??bin\blank.bin
?????文件???????1936??2018-07-26?11:03??bin\boot_v1.2.bin
?????文件???????3856??2018-07-26?11:03??bin\boot_v1.6.bin
?????文件???????4080??2018-07-26?11:03??bin\boot_v1.7.bin
?????文件????1556014??2018-07-26?11:03??bin\eagle.dump
?????文件??????32480??2018-08-29?17:00??bin\eagle.flash.bin
?????文件?????255852??2018-08-29?17:00??bin\eagle.irom0text.bin
?????文件????4866812??2018-07-26?11:03??bin\eagle.S
?????文件????????128??2018-07-26?11:03??bin\esp_init_data_default_v05.bin
?????文件????????128??2018-07-26?11:03??bin\esp_init_data_default_v08.bin
?????文件???????3339??2018-07-26?11:03??bin\tool_config.txt
?????文件????1557367??2018-08-29?17:00??bin\upgrade\.dump
?????文件????4864978??2018-08-29?17:00??bin\upgrade\.S
?????文件?????288468??2018-07-26?11:03??bin\upgrade\user1.4096.new.6.bin
?????文件????1554592??2018-07-26?11:03??bin\upgrade\user1.4096.new.6.dump
?????文件????4864745??2018-07-26?11:03??bin\upgrade\user1.4096.new.6.S
?????文件?????288452??2018-07-26?11:03??bin\upgrade\_temp_by_dltool\downloadPanel1\user1.4096.new.6.bin_rep
?????文件???????3856??2018-07-26?11:03??bin\_temp_by_dltool\downloadPanel1\boot_v1.6.bin_rep
?????文件???????4080??2018-07-26?11:03??bin\_temp_by_dltool\downloadPanel1\boot_v1.7.bin_rep
?????文件??????32480??2018-08-29?19:21??bin\_temp_by_dltool\downloadPanel1\eagle.flash.bin_rep
............此處省略418個文件信息
- 上一篇:使用latex發IEEE論文
- 下一篇:天津金保二期信息系統總體設計方案
評論
共有 條評論