资源简介
esp8266点灯通过PC工具工具点灯
代码片段和文件信息
/*
* 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/uart.h“
#include “osapi.h“
#include “driver/uart_register.h“
#include “mem.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
P
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-08-11 17:56 5_GPIO_Output\
文件 4622 2018-05-22 18:13 5_GPIO_Output\.cproject
文件 833 2018-05-11 17:28 5_GPIO_Output\.project
目录 0 2018-09-18 10:17 5_GPIO_Output\.settings\
目录 0 2018-08-11 17:56 5_GPIO_Output\app\
目录 0 2018-08-11 17:56 5_GPIO_Output\app\.output\
目录 0 2018-08-11 17:56 5_GPIO_Output\app\.output\eagle\
目录 0 2018-08-11 17:56 5_GPIO_Output\app\.output\eagle\debug\
目录 0 2018-09-18 10:17 5_GPIO_Output\app\.output\eagle\debug\bin\
目录 0 2018-08-11 17:56 5_GPIO_Output\app\.output\eagle\debug\image\
文件 302289 2018-05-22 21:51 5_GPIO_Output\app\.output\eagle\debug\image\eagle.app.v6.out
目录 0 2018-08-11 17:56 5_GPIO_Output\app\driver\
目录 0 2018-08-11 17:56 5_GPIO_Output\app\driver\.output\
目录 0 2018-08-11 17:56 5_GPIO_Output\app\driver\.output\eagle\
目录 0 2018-08-11 17:56 5_GPIO_Output\app\driver\.output\eagle\debug\
目录 0 2018-08-11 17:56 5_GPIO_Output\app\driver\.output\eagle\debug\lib\
文件 42116 2018-05-22 21:51 5_GPIO_Output\app\driver\.output\eagle\debug\lib\libdriver.a
目录 0 2018-08-11 17:56 5_GPIO_Output\app\driver\.output\eagle\debug\obj\
文件 1475 2018-05-22 21:51 5_GPIO_Output\app\driver\.output\eagle\debug\obj\uart.d
文件 41432 2018-05-22 21:51 5_GPIO_Output\app\driver\.output\eagle\debug\obj\uart.o
文件 1446 2018-02-06 20:45 5_GPIO_Output\app\driver\Makefile
文件 28009 2018-02-06 20:45 5_GPIO_Output\app\driver\uart.c
文件 3080 2018-02-06 20:45 5_GPIO_Output\app\gen_misc.bat
文件 3779 2018-02-06 20:45 5_GPIO_Output\app\gen_misc.sh
目录 0 2018-08-11 17:56 5_GPIO_Output\app\include\
目录 0 2018-08-11 17:56 5_GPIO_Output\app\include\driver\
文件 6808 2018-02-06 20:45 5_GPIO_Output\app\include\driver\uart.h
文件 7547 2018-02-06 20:45 5_GPIO_Output\app\include\driver\uart_register.h
文件 1298 2018-05-11 14:23 5_GPIO_Output\app\include\user_config.h
文件 2846 2018-02-06 20:45 5_GPIO_Output\app\Makefile
文件 266 2018-02-06 20:45 5_GPIO_Output\app\make_lib.sh
............此处省略417个文件信息
- 上一篇:WiFi模块测试程序
- 下一篇:多级菜单框架
相关资源
- 51单片机protues文件(KST-51.DSN)
- 海康私有流分析接口源码(附使用说
- IoT-ESP32_DHT11温湿度_2017P40
- 弹跳的小球(test.c)
- Beginning C++17 From Novice to Professional
- aes加解密(vc源程序)
- Voice Process(基于speex的回声消除)
- 基于空调项目的Autosar 架构的设计.d
- 自洽SU3手性夸克-孤子模型中单重子的
- MFCaccess.rar
- 手性摄动理论中双迷人重子的辐射衰
- 自协变重子手性扰动理论中自旋1/2双
- 《Data Structures and Algorithm Analysis in C
- ResHacker 3.5 汉化 绝对可用
- MFC对ACCESS数据库的增加、删除、查找
- AES-128-CBC算法C语言源码已经修改,可
- C++实现的蓝牙应用程序框架-BlueSolei
- 单片机C语言与PROTUES仿真技能实训
- 求点介数C++实现 Betweenness Centrality
- C++实现AES、DES加密算法含MFC界面
- 3DES加密算法C++实现
- DES/3DES算法C语言实现
- c++ test9.5破解工具
- DES和3DES加密算法,C语言,适用于单片
- 各种加密算法C语言版
-
C++_AES_ECB_ba
se64 - Data Structures and Algorithm Analysis in C++
- The Design And Evolution Of C++英文版
- NES 游戏 C语言开发教程
- AES算法采用verilog硬件实现
评论
共有 条评论