当前位置:网站首页>Small open source projects based on stm32f1
Small open source projects based on stm32f1
2022-06-11 14:43:00 【Struggling Xiaopeng】
One . brief introduction
In the previous articles , Each part of the project is briefly introduced , Today, I share it with you as a complete version . Like it , You can get it yourself .
Demo video
If you have watched the demo video , This is a good lesson , Or as a first choice for beginners .
Welcome to WeChat official account.
FPGA The journey reply STM32-Project1 Get download link
Two . Introduction to the project framework
This project does not use RTOS operating system , It's a bare metal program , It uses a front and back-end framework . The interrupt callback function is used to query whether each state occurs and mark it , And then in main Function .
Entering main After the function , Is to initialize each hardware part , And load the startup animation , This is also a standard process .
uart_init(115200);
delay_init();
LCD_Init();
TIM4Init(); // Time delay
InfraredInit();
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
LCDDMAFullOn(BackGround);
Boot_Animation(); // Power on animation
LCDDMAFullOn(BackGround);
Then, according to the current mode, enter into different if Statement to execute the corresponding function , Default to main interface , Inside is a while Loop statement . Perform the corresponding operation through the value of the key , After each operation , To reset the state of the key .SelectUp and SelectDown It refers to the up and down movement of the cursor , When switching states , utilize break You can jump out .
The implementation process of every other state is written in this way , Very easy to expand .
if(CurrMode == Main) // main interface
{
LCDDMAFullOn(BackGround);
MainInterface();
while(1)
{
if(KEYState == KEYLEFT)
{
SelectUp();
KEYState = KEYNONE;
}
else if(KEYState == KEYRIGHT)
{
SelectDown();
KEYState = KEYNONE;
}
else if(KEYState == KEYUP)
{
CurrMode = (enum State)(CurrIndex + 1);
if(CurrMode == 3)
CurrMode = Photo;
KEYState = KEYNONE;
break;
}
}
}
边栏推荐
- 数据库优化
- Architectural concept exploration: Taking the development of card games as an example
- Current situation and future development trend of global and Chinese metal casting robot market
- Question bank and answers of the latest national fire-fighting facility operators (primary fire-fighting facility operators) in 2022
- 当开源遇见 KPI,全球化 VS 本土化,开源的理想与现实该如何和解?
- 为什么需要public static void main(String[ ] args)这个方法?
- What is excess product power? Find the secret key of the second generation cs75plus in the year of the tiger
- Nexus configuration Yum repository for repository manager
- 深度剖析「圈組」關系系統設計 | 「圈組」技術系列文章
- 2021 年 CNCF 调查:Kubernetes 跨越鸿沟的一年
猜你喜欢

Leetcode 1968. 构造元素不等于两相邻元素平均值的数组(可以,终于解决)

大道至简 | 设计 ViT 到底怎么配置Self-Attention才是最合理的?

数据库优化

线程池的七个参数与拒绝策略
![[verification of SystemVerilog] ~ test platform, hardware design description, excitation generator, monitor and comparator](/img/3a/0cc26400eeb4b388face09b9a10f27.png)
[verification of SystemVerilog] ~ test platform, hardware design description, excitation generator, monitor and comparator

Leetcode 1968. Construct an array whose elements are not equal to the average value of two adjacent elements (yes, finally solved)

North China pushed Yale hard, MIT won the first place in a row, and the latest 2023qs world university ranking was released

How to manually package your own projects

深度剖析「圈組」關系系統設計 | 「圈組」技術系列文章

MySQL advanced statement
随机推荐
一些经典的嵌入式C面试题汇总
2022年湖南省安全员-C证考试练习题及在线模拟考试
In depth research and analysis report on global and Chinese spray drying machinery market
Avenue to simplicity | how to configure self attention for vit is the most reasonable?
[verification of SystemVerilog] ~ test platform, hardware design description, excitation generator, monitor and comparator
In depth research and analysis report on global and Chinese smart lamp Market
百度某离职员工跳槽字节被判赔107万元;苹果谷歌微软拟“干掉”密码;传吉利已收购魅族|Q资讯
In depth research and analysis report on global and Chinese diet food market
IC fresh Chinese cabbage price of 400000 yuan! Experienced experts who have worked for many years guide you how to choose an offer!
PowerShell主架构师:我用业余时间开发项目,表现优秀反而被微软降级了
gensim.models word2vec 参数
高通WLAN框架学习(29)-- 6GHz 概述
In depth research and analysis report on ready to eat meat market for vacuum low temperature cooking in the world and China
基于Qt开发实现的任务管理器
In depth research and analysis report on global and Chinese one component liquid rubber Market
Nexus configuration Yum repository for repository manager
回溯法/解空间树 排列树
2022 Hunan Provincial Safety officer-c certificate examination practice questions and online simulation examination
Hashicopy之nomad应用编排方案01
非常值得學習的調度開源庫推薦