4ilo/ssd1306-stm32HAL
关于
ssd1306 library for stm32 using hal library
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +2
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文ssd1306-stm32HAL
ssd1306 library for stm32 using stm32-hal library's. This library works with i2c and is configured for 128x64 oled panels by default.
If you search 4-wire SPI support, you can find it in the afiskon/stm32-ssd1306 fork.
If you need a font generator to add custom fonts you can find it here: the-this-pointer/glcd-font-calculator.
Usage
Compile and link the library files in your project.
- font.c
- ssd1306.c
A full example for stm32f411 discovery is located in the example folder.
Small example:
#include "ssd1306.h"
#include "fonts.h"
I2C_HandleTypeDef hi2c1;
// Init lcd using one of the stm32HAL i2c typedefs
ssd1306_Init(&hi2c1);
// Write data to local screenbuffer
ssd1306_SetCursor(0, 36);
ssd1306_WriteString("4ilo", Font_11x18, White);
// Copy all data from local screenbuffer to the screen
ssd1306_UpdateScreen(&hi2c1);
128x32 example
The library can be used with different screen sizes by redefining the SSD1306_WIDTH and SSD_1306_HEIGHT defines.
Some smaller screens might be wired with interlacing, if you encounter issues related to interlacing defining SSD1306_COM_LR_REMAP will configure the controller to support this feature.
make EXTRA_CFLAGS="-DSSD1306_HEIGHT=32 -DSSD1306_COM_LR_REMAP"
Some screens might also be using another 'Sequential COM pin configuration'. Defining SSD1306_COM_ALTERNATIVE_PIN_CONFIG as 0 will configure the controller to use another configuration.
make EXTRA_CFLAGS="-DSSD1306_HEIGHT=32 -DSSD1306_COM_LR_REMAP -DSSD1306_COM_ALTERNATIVE_PIN_CONFIG=0"
探索相关项目
加载中…