资源简介
次开发包 是基于ESP8266 语音识别的 SDK二次开发 源码,有需要的兄弟可以下载
代码片段和文件信息
/*
* ESPRSSIF MIT License
*
* Copyright (c) 2015
*
* 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 “espressif/esp_common.h“
#include “freertos/portmacro.h“
#include “gpio.h“
void gpio_config(GPIO_ConfigTypeDef *pGPIOConfig)
{
uint16 gpio_pin_mask = pGPIOConfig->GPIO_Pin;
uint32 io_reg;
uint8 io_num = 0;
uint32 pin_reg;
if (pGPIOConfig->GPIO_Mode == GPIO_Mode_Input) {
GPIO_AS_INPUT(gpio_pin_mask);
} else if (pGPIOConfig->GPIO_Mode == GPIO_Mode_Output) {
GPIO_AS_OUTPUT(gpio_pin_mask);
}
do {
if ((gpio_pin_mask >> io_num) & 0x1) {
io_reg = GPIO_PIN_REG(io_num);
if ((0x1 << io_num) & (GPIO_Pin_0 | GPIO_Pin_2 | GPIO_Pin_4 | GPIO_Pin_5)) {
PIN_FUNC_SELECT(io_reg 0);
} else {
PIN_FUNC_SELECT(io_reg 3);
}
if (pGPIOConfig->GPIO_Pullup) {
PIN_PULLUP_EN(io_reg);
} else {
PIN_PULLUP_DIS(io_reg);
}
if (pGPIOConfig->GPIO_Mode == GPIO_Mode_Out_OD) {
portENTER_CRITICAL();
pin_reg = GPIO_REG_READ(GPIO_PIN_ADDR(io_num));
pin_reg &= (~GPIO_PIN_DRIVER_MASK);
pin_reg |= (GPIO_PAD_DRIVER_ENABLE << GPIO_PIN_DRIVER_LSB);
GPIO_REG_WRITE(GPIO_PIN_ADDR(io_num) pin_reg);
portEXIT_CRITICAL();
} else if (pGPIOConfig->GPIO_Mode == GPIO_Mode_Sigma_Delta) {
portENTER_CRITICAL();
pin_reg = GPIO_REG_READ(GPIO_PIN_ADDR(io_num));
pin_reg &= (~GPIO_PIN_SOURCE_MASK);
pin_reg |= (0x1 << GPIO_PIN_SOURCE_LSB);
GPIO_REG_WRITE(GPIO_PIN_ADDR(io_num) pin_reg);
GPIO_REG_WRITE(GPIO_SIGMA_DELTA_ADDRESS SIGMA_DELTA_ENABLE);
port
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 38144 2016-01-19 13:30 model two-dimension code.jpg
----------- --------- ---------- ----- ----
38144 1
- 上一篇:模糊控制理论与系统原理-诸静
- 下一篇:IOCP服务器
相关资源
- Qt商业版完整SDK+license
- esp8266和stm32之五,能连接路由器和增
- f103 c8t6 esp8266连接阿里云.rar
- stm32通过esp8266把温湿度和gps地图上传
- 安信可ESP8266安卓手机测试软件
- 佳博打印机SDK包含自己用Labview写的例
- ESP8266WiFi探针代码
- ESP8266参考书籍英文版
- 海康视频监控 hik chrome 谷歌浏览器 二
- vuforia sdk
- BCM 56XX SDK 编程手册
- 人脸识别二次开发包(SDK)
- BiometricSDK指纹识别v1.1源码
- 大家期待的 STM32 MOTOR CONTROL SDK 5.01
- Bumble2相机双目立体视觉原理、使用手
- go-micro微服务开发框架中文指导
- ESP8266探针
- WEB方式直连大华设备Demo带云台&SDK;
- esp8266-technical_reference_en.pdf
- STM32+ESP8266+MQTT接入OneNet 通过手机APP控
- paho.mqtt.c 树莓派交叉编译版本SDK
- vSphere中文SDK
- PI数据库AFSDK
- FFmpeg-full-SDK-3.2.zip
- FoxitReader_AX_Pro3.0(附带接口说明文档
- 实现三维图形绘制
- esp8266和stm32驱动之三实现访问网站获
- BX2400_BLE_SDK_V1.6_3697.zip
- ESP8266.zip
- 支持科大讯飞语音识别的树莓派版本
评论
共有 条评论