当前位置:网站首页>Stm32f103c8t6 firmware library lighting
Stm32f103c8t6 firmware library lighting
2022-07-03 16:01:00 【Big golden hair】
summary : Configure lighting graphic description through firmware library
1. In the firmware library folder USER Create a folder in LED, stay LED Create text in folder ,LED.C,LED.H


2. stay keil Middle double click user The folder will c Add the file

3. stay c Add the required header file to the file , This time we need
#include "led.h"
#include "stm32f10x.h"Compile once after adding
4. open led.h, Add... To it
#include "stm32f10x.h"5. Add a path to the magic wand



7. Write led-init Function configuration GPIO Structure

It can be seen from the schematic diagram that LED Corresponding PC13, We need to configure GPIOc The clock of ,GPIOc Mounted on APB2 On , So it needs to be turned on APB2 The clock on the computer .

GPIO_InitTypeDef It includes

Pin , Speed ( You can choose any one for the time being ), The output mode ( Push pull output )
Use GPIO_Init(); Function initialization on GPIO, The first parameter is GPIOX, The second is the address of the structure variable
stay h Relevant functions are described in the document

8. stay main.c Initialization function used in

9. You need to use two functions ,GPIO_SetBit()[ Set up 1] and GPIO_RsetBit()[ Set up 0]
From the schematic diagram, you want LED bright GPIO One end should be placed 0 In order to have enough pressure difference to make LED bright
GPIO_ResetBits(GPIOC,GPIO_Pin_13);10. compile , Swipe after no error
边栏推荐
- Shell script import and export data
- 关于网页中的文本选择以及统计选中文本长度
- CString的GetBuffer和ReleaseBuffer使用说明
- Nine ways to define methods in scala- Nine ways to define a method in Scala?
- Nifi from introduction to practice (nanny level tutorial) - flow
- Project -- high concurrency memory pool
- 请做好3年内随时失业的准备?
- [combinatorics] combinatorial identities (recursive combinatorial identities | sum of variable terms | simple combinatorial identities and | sum of variable terms | staggered sums of combinatorial ide
- 软件逆向破解入门系列(1)—xdbg32/64的常见配置及功能窗口
- Embedded development: seven reasons to avoid open source software
猜你喜欢

UnityShader——MaterialCapture材质捕捉效果 (翡翠斧头)

How to use annotations such as @notnull to verify and handle global exceptions

Embedded development: seven reasons to avoid open source software

Digital image processing -- popular understanding of corrosion and expansion

“用Android复刻Apple产品UI”(2)——丝滑的AppStore卡片转场动画

Automatic generation of client code from flask server code -- Introduction to flask native stubs Library
![[redis foundation] understand redis persistence mechanism together (rdb+aof graphic explanation)](/img/68/3721975cf33fcfacc28dc4d3d6a5ca.jpg)
[redis foundation] understand redis persistence mechanism together (rdb+aof graphic explanation)

子类隐藏父类的同名函数

Microservice - fuse hystrix

Seckill system 3- product list and product details
随机推荐
潘多拉 IOT 开发板学习(HAL 库)—— 实验5 外部中断实验(学习笔记)
Why can't strings be directly compared with equals; Why can't some integers be directly compared with the equal sign
"Remake Apple product UI with Android" (3) - elegant statistical chart
“用Android复刻Apple产品UI”(2)——丝滑的AppStore卡片转场动画
Seckill system 3- product list and product details
Detailed pointer advanced 2
pyinstaller不是内部或外部命令,也不是可运行的程序 或批处理文件
软件逆向破解入门系列(1)—xdbg32/64的常见配置及功能窗口
WinDbg analysis dump file
通过进程PID获取可执行文件路径(QueryFullProcessImageName)
Detailed explanation of four modes of distributed transaction (Seata)
[system safety] 43 PowerShell malicious code detection series (5) automatic extraction of ten thousand words from abstract syntax tree
App mobile terminal test [5] file writing and reading
Reflection on some things
六月 致 -.-- -..- -
June to - -------
《天天数学》连载56:二月二十五日
Pandora IOT development board learning (HAL Library) - Experiment 5 external interrupt experiment (learning notes)
Creation and destruction of function stack frames
Go语言自学系列 | golang switch语句