SDL3 Form SIM_Display

This commit is contained in:
JiXieShi
2024-09-21 20:43:31 +08:00
parent fbc054d999
commit 6c9a999c71
14 changed files with 448 additions and 62 deletions

View File

@@ -2,21 +2,16 @@
#include "graphics.h"
#include <conio.h>
static SIM_Display_t oled_display;
void SIM_OLED_INIT(int width, int height, uint32_t pixcolor, uint32_t backcolor, int scale, uint8_t b) {
SIM_Display_INIT(width,height,pixcolor,backcolor,scale,b);
SIM_Display_Init("OLED", width, height, pixcolor, backcolor, scale, &oled_display);
}
void SIM_OLED_START() {
SIM_Display_START();
}
void SIM_OLED_STOP() {
SIM_Display_STOP();
SIM_Display_STOP(&oled_display);
}
void SIM_OLED_DrawFromBuffer(uint8_t *buf, uint8_t width, uint8_t height) {
SIM_OneColor_DrawFromBuffer(buf,width,height);
SIM_OneColor_DrawFromBuffer(&oled_display, buf, width, height);
}

View File

@@ -19,13 +19,6 @@ extern "C" {
**/
void SIM_OLED_INIT(int width, int height, uint32_t pixcolor, uint32_t backcolor, int scale, uint8_t border);
/**
* @brief 开始模拟 OLED 显示
* @return void
* @example SIM_OLED_START();
**/
void SIM_OLED_START();
/**
* @brief 停止模拟 OLED 显示
* @return void