91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2.42MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-09-09
  • 語言: 其他
  • 標簽: ESP8266的??TCP通信??

資源簡介

ESP8266的 TCP通信(server)

資源截圖

代碼片段和文件信息

/*
?*?File :?uart.c
?*?Copyright?(C)?2013?-?2016?Espressif?Systems
?*
?*?This?program?is?free?software:?you?can?redistribute?it?and/or?modify
?*?it?under?the?terms?of?version?3?of?the?GNU?General?Public?License?as
?*?published?by?the?Free?Software?Foundation.
?*
?*?This?program?is?distributed?in?the?hope?that?it?will?be?useful
?*?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?*?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
?*?GNU?General?Public?License?for?more?details.
?*
?*?You?should?have?received?a?copy?of?the?GNU?General?Public?License?along
?*?with?this?program.??If?not?see?.
?*/
#include?“ets_sys.h“
#include?“osapi.h“
#include?“driver/uart.h“
#include?“osapi.h“
#include?“os_type.h“

//?UartDev?is?defined?and?initialized?in?rom?code.
extern?UartDevice????UartDev;

LOCAL?struct?UartBuffer*?pTxBuffer?=?NULL;
LOCAL?struct?UartBuffer*?pRxBuffer?=?NULL;

/*uart?demo?with?a?system?task?to?output?what?uart?receives*/
/*this?is?a?example?to?process?uart?data?from?taskplease?change?the?priority?to?fit?your?application?task?if?exists*/
/*it?might?conflict?with?your?task?if?soplease?arrange?the?priority?of?different?task??or?combine?it?to?a?different?event?in?the?same?task.?*/
#define?uart_recvTaskPrio????????0
#define?uart_recvTaskQueueLen????10
os_event_t????uart_recvTaskQueue[uart_recvTaskQueueLen];

#define?DBG??
#define?DBG1?uart1_sendStr_no_wait
#define?DBG2?os_printf


LOCAL?void?uart0_rx_intr_handler(void?*para);

/******************************************************************************
?*?FunctionName?:?uart_config
?*?Description??:?Internal?used?function
?*????????????????UART0?used?for?data?TX/RX?RX?buffer?size?is?0x100?interrupt?enabled
?*????????????????UART1?just?used?for?debug?output
?*?Parameters???:?uart_no?use?UART0?or?UART1?defined?ahead
?*?Returns??????:?NONE
*******************************************************************************/
LOCAL?void?ICACHE_FLASH_ATTR
uart_config(uint8?uart_no)
{
????if?(uart_no?==?UART1){
????????PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U?FUNC_U1TXD_BK);
????}else{
????????/*?rcv_buff?size?if?0x100?*/
????????ETS_UART_INTR_ATTACH(uart0_rx_intr_handler??&(UartDev.rcv_buff));
????????PIN_PULLUP_DIS(PERIPHS_IO_MUX_U0TXD_U);
????????PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U?FUNC_U0TXD);
#if?UART_HW_RTS
????????PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U?FUNC_U0RTS);???//HW?FLOW?CONTROL?RTS?PIN
????????#endif
#if?UART_HW_CTS
????????PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U?FUNC_U0CTS);???//HW?FLOW?CONTROL?CTS?PIN
????????#endif
????}
????uart_div_modify(uart_no?UART_CLK_FREQ?/?(UartDev.baut_rate));//SET?BAUDRATE
????
????WRITE_PERI_REG(UART_CONF0(uart_no)?((UartDev.exist_parity?&?UART_PARITY_EN_M)??<????????????????????????????????????????????????????????????????????????|?((UartDev.parity?&?UART_PARITY_M)??<??????????????????????????????????????????????????????????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????4601??2017-07-03?20:50??Tcp\.cproject

?????文件????????831??2017-07-03?16:11??Tcp\.project

?????文件???????4480??2017-06-13?15:04??Tcp\Tcp\.cproject

?????文件????????831??2015-07-18?14:29??Tcp\Tcp\.project

?????文件?????468476??2017-07-04?17:20??Tcp\Tcp\app\.output\eagle\debug\image\eagle.app.v6.out

?????文件??????47916??2017-07-04?17:20??Tcp\Tcp\app\driver\.output\eagle\debug\lib\libdriver.a

?????文件???????1391??2017-07-04?17:20??Tcp\Tcp\app\driver\.output\eagle\debug\obj\uart.d

?????文件??????47232??2017-07-04?17:20??Tcp\Tcp\app\driver\.output\eagle\debug\obj\uart.o

?????文件???????1490??2015-07-03?20:29??Tcp\Tcp\app\driver\Makefile

?????文件??????27382??2017-06-11?12:41??Tcp\Tcp\app\driver\uart.c

?????文件???????3226??2015-05-22?15:09??Tcp\Tcp\app\gen_misc.bat

?????文件???????3276??2015-05-22?15:08??Tcp\Tcp\app\gen_misc.sh

?????文件????????359??2017-06-11?11:47??Tcp\Tcp\app\include\client.h

?????文件???????6232??2015-07-03?20:29??Tcp\Tcp\app\include\driver\uart.h

?????文件???????7038??2015-07-03?20:29??Tcp\Tcp\app\include\driver\uart_register.h

?????文件????????229??2017-07-03?17:24??Tcp\Tcp\app\include\server.h

?????文件???????1148??2015-07-03?20:29??Tcp\Tcp\app\include\user_config.h

?????文件????????418??2017-07-03?17:22??Tcp\Tcp\app\include\user_main.h

?????文件???????2876??2015-07-14?05:42??Tcp\Tcp\app\Makefile

?????文件??????51946??2017-07-04?17:20??Tcp\Tcp\app\user\.output\eagle\debug\lib\libuser.a

?????文件???????1500??2017-07-04?17:19??Tcp\Tcp\app\user\.output\eagle\debug\obj\client.d

?????文件??????14964??2017-07-04?17:20??Tcp\Tcp\app\user\.output\eagle\debug\obj\client.o

?????文件???????1497??2017-07-04?17:19??Tcp\Tcp\app\user\.output\eagle\debug\obj\sever.d

?????文件??????14112??2017-07-04?17:20??Tcp\Tcp\app\user\.output\eagle\debug\obj\sever.o

?????文件???????1624??2017-07-04?17:19??Tcp\Tcp\app\user\.output\eagle\debug\obj\user_main.d

?????文件??????22112??2017-07-04?17:20??Tcp\Tcp\app\user\.output\eagle\debug\obj\user_main.o

?????文件???????2243??2017-07-04?17:25??Tcp\Tcp\app\user\client.c

?????文件???????1522??2015-07-03?20:29??Tcp\Tcp\app\user\Makefile

?????文件???????1904??2017-07-04?17:25??Tcp\Tcp\app\user\sever.c

?????文件???????3538??2017-07-04?17:25??Tcp\Tcp\app\user\user_main.c

............此處省略83個文件信息

評論

共有 條評論