当前位置:网站首页>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
边栏推荐
- STM32---ADC
- 99 multiplication table (C language)
- Use indent to format code
- Sql Server的存储过程详解
- Charge pump boost principle - this article will give you a simple understanding
- MHA High available Cluster for MySQL
- Talk about the function of magnetic beads in circuits
- 【论文阅读】2022年最新迁移学习综述笔注(Transferability in Deep Learning: A Survey)
- Sizeof (function name) =?
- Sql Server的存儲過程詳解
猜你喜欢

Bluebridge cup internet of things basic graphic tutorial - GPIO output control LD5 on and off

STM32 tutorial triple ADC interleaved sampling

MySQL之MHA高可用集群

Management and use of DokuWiki (supplementary)

Explain task scheduling based on Cortex-M3 in detail (Part 2)

MHA High available Cluster for MySQL

My-basic application 2: my-basic installation and operation
![[trio basic tutorial 18 from introduction to proficiency] trio motion controller UDP fast exchange data communication](/img/05/0f63e4cd3da24e5b956ec5899b939d.jpg)
[trio basic tutorial 18 from introduction to proficiency] trio motion controller UDP fast exchange data communication

Stm32--- systick timer

剑指 Offer 06. 从尾到头打印链表
随机推荐
Negative pressure generation of buck-boost circuit
How to copy formatted notepad++ text?
OC and OD gate circuit
Five design details of linear regulator
Arduino uses nrf24l01+ communication
Sizeof (function name) =?
MATLAB小技巧(28)模糊綜合評價
实例008:九九乘法表
STM32 --- GPIO configuration & GPIO related library functions
STM32 single chip microcomputer -- debug in keil5 cannot enter the main function
Installation and use of libjpeg and ligpng
Bluebridge cup internet of things competition basic graphic tutorial - clock selection
【NOI模拟赛】汁树(树形DP)
Soem EtherCAT source code analysis attachment 1 (establishment of communication operation environment)
STM32 single chip microcomputer - external interrupt
STM32---IIC
2022.7.4-----leetcode. one thousand and two hundred
STM32 summary (HAL Library) - DHT11 temperature sensor (intelligent safety assisted driving system)
[tutorial 19 of trio basic from introduction to proficiency] detailed introduction of trio as a slave station connecting to the third-party bus (anybus PROFIBUS DP...)
UE pixel stream, come to a "diet pill"!