当前位置:网站首页>The efficiency principle that ISR should follow
The efficiency principle that ISR should follow
2022-07-22 02:52:00 【HelloAaric】
use C Language to write interrupt service program (ISR) Follow the principle of high efficiency :
- Interrupt function code should be as concise as possible —— Generally, it is not suitable to write a large number of complex and lengthy code in interrupt functions ;
- Try to avoid calling other custom functions inside interrupt functions ;
- Try to avoid calling mathematical functions within interrupts —— Because some mathematical functions involve many related library function calls and intermediate variables , Cross calls may occur . When mathematical functions must be used , It can be considered to hand over the complex mathematical function operation task to the main program , The interrupt function references its result through a global variable ;
- Macro definition and call —— Call macro in interrupt function , It can reduce the overhead of stack and out of stack in function call .
边栏推荐
- 生成数字图像基本过程
- Codeforces Round #578 (Div. 2) B - Block Adventure 【贪心】
- 872. 最大公约数
- Redis到底是单线程还是多线程
- Codeforces Round #579 (Div. 3) C - Common Divisors 【数论】
- Flink应用案例统计实现TopN的两种方式
- Codeforces Round #578 (Div. 2) C - Round Corridor 【数论+规律】
- Quartz simple usage and its es job
- Product code update code
- Airbnb 如何实现 Kubernetes 集群动态扩展
猜你喜欢
bootloader系列三——核心初始化
虚拟机win7系统安装vmtool
Grafana visual configuration chart table
Basic principle and configuration of switch
一篇论文8778个作者:人均写5个字,署名用了17页
生成数字图像基本过程
quartz簡單用法及其es-job
驱动开发之双机调试环境搭建(VS2017)
There are 8778 authors in a paper: each person writes 5 words, and the signature takes 17 pages
Flink应用案例统计实现TopN的两种方式
随机推荐
bootloader系列二——arm920t--bootloader架构设计
手把手教您上传NCBI 数据,免费课程包您学会!
简单总结一下图像处理中概念
【微信小程序】camera系统相机(79/100)
Nature | Yang 祎 et al. Revealed that the evolution within the host may lead to the pathogenesis of intestinal symbiotic bacteria
Recommendation number | those who are truly outstanding are practicing the "best strategy in life" and recommending these high-quality numbers
three hundred and thirteen billion one hundred and thirty-one million three hundred and thirteen thousand one hundred and twenty-three
Basic principle and configuration of switch
Two ways to implement topn with Flink application case statistics
Chapter 2 software process and thought section 1 Foundation
MySQL performance optimization (III): in depth understanding of indexing
Product code update code
Educational Codeforces Round 70 A题 You Are Given Two Binary Strings...
bootloader系列一——Arm处理器启动流程解析
卷积核扩大到51x51,新型CNN架构SLaK反击Transformer
70. Climb stairs: suppose you are climbing stairs. You need n steps to reach the roof. You can climb one or two steps at a time. How many different ways can you climb to the roof?
2019杭电多校 第七场 6651-Final Exam【规律+思维】
Codeforces Round #579 (Div. 3) C - Common Divisors 【数论】
Doctor application | the City University of Hong Kong's Liu Chen teacher group recruits doctors / postgraduates / Masters /ra
Leetcode 104. 二叉树的最大深度