mirror of https://gitee.com/gaohongy/stm32.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 years ago | |
---|---|---|
.. | ||
.settings | 2 years ago | |
Core | 2 years ago | |
Debug | 2 years ago | |
Drivers | 2 years ago | |
.cproject | 2 years ago | |
.mxproject | 2 years ago | |
.project | 2 years ago | |
I2C_OLED Debug.launch | 2 years ago | |
I2C_OLED.ioc | 2 years ago | |
Readme.md | 2 years ago | |
STM32F103C8TX_FLASH.ld | 2 years ago |
Readme.md
I2C_OLED
-
将PB6、PB7分别配置为I2C_SCL、I2C_SDA
-
在Project Manager - Code Generator中勾选Generate peripheral initialization as a pair of...
-
配置I2C1
- I2C选择I2C
-
复制oled.c/oled.h/oledfont.h文件到Core的Src/Inc目录下
-
初始化OLED API
- OLED_Init();
- OLED_ColorTurn(0);
- OLED_DisplayTurn(0);
-
注意:调用OLED_ShowString之后,需要调用OLED_Refresh()才能刷新屏显。