当前位置:网站首页>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
边栏推荐
- 【三层架构及JDBC总结】
- Example 007: copy data from one list to another list.
- Semiconductor devices (III) FET
- Detailed explanation of SQL server stored procedures
- STM32 --- NVIC interrupt
- 实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
- Semiconductor devices (I) PN junction
- Detailed summary of FIO test hard disk performance parameters and examples (with source code)
- Circleq of linked list
- Sword finger offer 09 Implementing queues with two stacks
猜你喜欢
实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?

每日一题——输入一个日期,输出它是该年的第几天
![[trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code](/img/58/576b6b77509ed7a9bef138f3899e37.jpg)
[trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code

Classic application of MOS transistor circuit design (1) -iic bidirectional level shift

MHA High available Cluster for MySQL

实例003:完全平方数 一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?

STM32 --- serial port communication

Arduino uses nrf24l01+ communication

List of linked lists
Example 001: the number combination has four numbers: 1, 2, 3, 4. How many three digits can be formed that are different from each other and have no duplicate numbers? How many are each?
随机推荐
Basic information commands and functions of kernel development
【三层架构及JDBC总结】
Negative pressure generation of buck-boost circuit
Arduino uses nrf24l01+ communication
MySQL MHA high availability cluster
Bluebridge cup internet of things basic graphic tutorial - GPIO input key control LD5 on and off
Daily question - input a date and output the day of the year
Several implementation schemes of anti reverse connection protection of positive and negative poles of power supply!
每日一题——输入一个日期,输出它是该年的第几天
Infected Tree(树形dp)
Semiconductor devices (I) PN junction
Example 009: pause output for one second
Example 010: time to show
[trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code
STM32 single chip microcomputer - external interrupt
STM32 outputs 1PPS with adjustable phase
Is the security account given by Yixue school safe? Where can I open an account
Example 008: 99 multiplication table
關於線性穩壓器的五個設計細節
Slist of linked list