当前位置:网站首页>Esp8266 interrupt configuration
Esp8266 interrupt configuration
2022-07-05 08:29:00 【Sharing master】
Recently, I am working on a light sense debugging project , Polling mode can receive data normally , There are problems in configuring interrupt mode ,
Initialize the configuration of intermediate configuration
pinMode(SensorINPUT, INPUT_PULLUP);
// attachInterrupt(D7, mn78xxx_setup_eint, CHANGE);
attachInterrupt(digitalPinToInterrupt(SensorINPUT),mn78xxx_setup_eint, FALLING); // Open encoder
Serial.println("init int done ");
Interrupt handling function
//ICACHE_RAM_ATTR void mn78xxx_setup_eint()
void mn78xxx_setup_eint()
{
alsps_int_flag == true;
}
- The function in must have no parameters and no return value .
- Because interruption will interrupt the normal operation of code , therefore ISR Should be implemented as soon as possible .
- stay ISR You cannot use other functions implemented with interrupts , Such as millis() delay() etc. . The delay can be used delayMicroseconds(), It is not implemented with interrupts .
- Interrupt trigger condition , There are several optional values :
LOW When the interrupt is Pin Trigger when the mouth is at low level
CHANGE When the interrupt is Pin Triggered when the port level changes
RISING When the interrupt is Pin The port changes from low level to high level ( Rising edge ) Trigger when
FALLING When the interrupt is Pin The port changes from high level to low level ( Falling edge ) Trigger when
边栏推荐
- Sword finger offer 09 Implementing queues with two stacks
- Take you to understand the working principle of lithium battery protection board
- Talk about the circuit use of TVs tube
- Simple design description of MIC circuit of ECM mobile phone
- STM32 single chip microcomputer - external interrupt
- 【三层架构】
- 【云原生 | 从零开始学Kubernetes】三、Kubernetes集群管理工具kubectl
- 实例009:暂停一秒输出
- Cinq détails de conception du régulateur de tension linéaire
- Working principle and type selection of common mode inductor
猜你喜欢
UE像素流,来颗“减肥药”吧!
[trio basic from introduction to mastery tutorial 20] trio calculates the arc center and radius through three points of spatial arc
[NAS1](2021CVPR)AttentiveNAS: Improving Neural Architecture Search via Attentive Sampling (未完)
Charge pump boost principle - this article will give you a simple understanding
实例007:copy 将一个列表的数据复制到另一个列表中。
STM32 single chip microcomputer -- debug in keil5 cannot enter the main function
Classic application of MOS transistor circuit design (2) - switch circuit design
Bluebridge cup internet of things basic graphic tutorial - GPIO output control LD5 on and off
Let's briefly talk about the chips commonly used in mobile phones - OVP chips
STM32 --- serial port communication
随机推荐
Arduino uses nrf24l01+ communication
Five design details of linear regulator
实例003:完全平方数 一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?
Summary of SIM card circuit knowledge
Live555 push RTSP audio and video stream summary (I) cross compilation
Example 005: three numbers sorting input three integers x, y, Z, please output these three numbers from small to large.
Wifi-802.11 negotiation rate table
Verilog -- state machine coding method
2022.7.4-----leetcode.1200
STM32 single chip microcomputer -- volatile keyword
One question per day - replace spaces
MATLAB小技巧(28)模糊综合评价
Briefly talk about the identification protocol of mobile port -bc1.2
Buildroot system for making raspberry pie cm3
动力电池UL2580测试项目包括哪些
Soem EtherCAT source code analysis II (list of known configuration information)
第十八章 使用工作队列管理器(一)
【三层架构及JDBC总结】
STM32 --- serial port communication
Naming rules for FreeRTOS