当前位置:网站首页>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 single chip microcomputer -- debug in keil5 cannot enter the main function
- Explain task scheduling based on Cortex-M3 in detail (Part 2)
- Tailq of linked list
- What are the test items of power battery ul2580
- Soem EtherCAT source code analysis II (list of known configuration information)
- How to write cover letter?
- QEMU demo makefile analysis
- Example 002: the bonus paid by the "individual income tax calculation" enterprise is based on the profit commission. When the profit (I) is less than or equal to 100000 yuan, the bonus can be increase
- Infected Tree(树形dp)
- STM32 summary (HAL Library) - DHT11 temperature sensor (intelligent safety assisted driving system)
猜你喜欢

Sword finger offer 09 Implementing queues with two stacks

Example 003: a complete square is an integer. It is a complete square after adding 100, and it is a complete square after adding 168. What is the number?

Compilation warning solution sorting in Quartus II

Brief discussion on Buck buck circuit

Arduino uses nrf24l01+ communication

Design a clock frequency division circuit that can be switched arbitrarily

【论文阅读】2022年最新迁移学习综述笔注(Transferability in Deep Learning: A Survey)

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

leetcode - 445. 两数相加 II
![[trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture](/img/c5/22c6148873508b9205972e1ad970a3.jpg)
[trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
随机推荐
NTC thermistor application - temperature measurement
[cloud native | learn kubernetes from scratch] III. kubernetes cluster management tool kubectl
STM32 virtualization environment of QEMU
Google sitemap files for rails Projects - Google sitemap files for rails projects
Bluetooth hc-05 pairing process and precautions
Sword finger offer 09 Implementing queues with two stacks
Chapter 18 using work queue manager (1)
Tailq of linked list
Semiconductor devices (III) FET
STM32 single chip microcomputer -- debug in keil5 cannot enter the main function
Anonymous structure in C language
[NAS1](2021CVPR)AttentiveNAS: Improving Neural Architecture Search via Attentive Sampling (未完)
实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
go依赖注入--google开源库wire
Classic application of MOS transistor circuit design (2) - switch circuit design
Why is 1900 not a leap year
Example 007: copy data from one list to another list.
【云原生 | 从零开始学Kubernetes】三、Kubernetes集群管理工具kubectl
关于线性稳压器的五个设计细节
STM32 tutorial triple ADC interleaved sampling