当前位置:网站首页>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;
}
}
}
边栏推荐
- Live800:智能客服提升客户体验的几种方式
- 非常值得學習的調度開源庫推薦
- How to manually package your own projects
- Global and China dynamic light scattering nano laser particle sizer market depth research and Analysis Report
- Leetcode 1968. 构造元素不等于两相邻元素平均值的数组(可以,终于解决)
- 2022-2028 global and Chinese near field scanning optical microscope (NSOM) market status and future development trend
- Is bone conduction earphone good for bone? Is bone conduction earphone harmful to the body?
- 百度某离职员工跳槽字节被判赔107万元;苹果谷歌微软拟“干掉”密码;传吉利已收购魅族|Q资讯
- Redis configuration and optimization of NoSQL
- gensim.models word2vec 参数
猜你喜欢

基于Qt开发实现的任务管理器

【Try to Hack】URL

数据库优化

Live800: several ways for intelligent customer service to improve customer experience

非常值得學習的調度開源庫推薦

深度剖析「圈组」关系系统设计 | 「圈组」技术系列文章

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

社交软件Soul撤回IPO申请:上市只差临门一脚 腾讯是大股东
![[Clickhouse column] user initialization of new library role](/img/00/a11fb1a8e38ed4e0634839160c8ead.png)
[Clickhouse column] user initialization of new library role

Leetcode 1968. Construct an array whose elements are not equal to the average value of two adjacent elements (yes, finally solved)
随机推荐
Analyse approfondie de la conception du système relationnel du Groupe de cercles
In depth research and analysis report on global and Chinese SURFBOARD WAX Market
2022 simulated 100 questions and simulated examination of quality officer municipal direction post skills (Quality Officer) examination
In depth research and analysis report on global and Chinese plant extract products market
PowerShell主架构师:我用业余时间开发项目,表现优秀反而被微软降级了
Raspberry school literacy
Guess numbers games
线程池的七个参数与拒绝策略
Current situation and future development trend of precision air conditioning market in the world and China
你违规了吗?
CNCF survey in 2021: a year for kubernetes to cross the gap
清北力压耶鲁,MIT蝉联第一,2023QS世界大学排名最新发布
Anaconda delete virtual environment
Seven parameters of thread pool and reject policy
Nexus configuration Yum repository for repository manager
After many years of digital transformation projects, the main architects are desperate: outsourcing should not have been used at the beginning!
Hamad application layout scheme of hashicopy 01
Individual income tax rate table
In depth research and analysis report on global and Chinese content audit market
Turning "passive" into "active", how to build security compliant intelligent products | Q recommendation