Start of 5.X work

This commit is contained in:
Sebastien L
2025-03-18 17:38:34 -04:00
parent c0ddf0a997
commit 73bd096f37
442 changed files with 227862 additions and 21075 deletions

View File

@@ -15,7 +15,7 @@
#include "driver/gpio.h"
#include "driver/ledc.h"
#include "esp_log.h"
#include "Configurator.h"
#include "Config.h"
#include "gds.h"
#include "gds_private.h"
@@ -30,8 +30,8 @@ static struct GDS_BacklightPWM PWMConfig;
static char TAG[] = "gds";
struct GDS_Device* GDS_AutoDetect( sys_Display * Driver, GDS_DetectFunc* DetectFunc[], struct GDS_BacklightPWM* PWM ) {
if (!Driver->has_common || Driver->common.driver == sys_DisplayDriverEnum_UNSPECIFIED_DRIVER) return NULL;
struct GDS_Device* GDS_AutoDetect( sys_display_config * Driver, GDS_DetectFunc* DetectFunc[], struct GDS_BacklightPWM* PWM ) {
if (!Driver->has_common || Driver->common.driver == sys_display_drivers_UNSPECIFIED) return NULL;
if (PWM) PWMConfig = *PWM;
for (int i = 0; DetectFunc[i]; i++) {

View File

@@ -3,7 +3,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "Configurator.h"
#include "Config.h"
/* NOTE for drivers:
The build-in DrawPixel(Fast), DrawCBR and ClearWindow have optimized for 1 bit
@@ -34,9 +34,9 @@ struct GDS_Layout {
bool ColorSwap;
};
typedef struct GDS_Device* GDS_DetectFunc(sys_Display * Driver, struct GDS_Device *Device);
typedef struct GDS_Device* GDS_DetectFunc(sys_display_config * Driver, struct GDS_Device *Device);
struct GDS_Device* GDS_AutoDetect( sys_Display * Driver, GDS_DetectFunc* DetectFunc[], struct GDS_BacklightPWM *PWM );
struct GDS_Device* GDS_AutoDetect( sys_display_config * Driver, GDS_DetectFunc* DetectFunc[], struct GDS_BacklightPWM *PWM );
void GDS_SetContrast( struct GDS_Device* Device, uint8_t Contrast );
void GDS_DisplayOn( struct GDS_Device* Device );

View File

@@ -40,9 +40,10 @@ static bool LoadFont(struct GDS_FontDef ** fontPtr, const char * fileName){
ESP_LOGE(TAG, "Invalid pointer for LoadFont");
return false;
}
char font_file_name[CONFIG_SPIFFS_OBJ_NAME_LEN+1]={0};
snprintf(font_file_name,sizeof(font_file_name),"/spiffs/fonts/%s",fileName);
// Allocate DMA-capable memory for the font
struct GDS_FontDef* loadedFont = load_file_dma(NULL,"fonts",fileName);
struct GDS_FontDef* loadedFont = load_file_dma(NULL,font_file_name);
// Check if allocation succeeded
if (loadedFont == NULL) {