mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-10 21:47:04 +03:00
Start of 5.X work
This commit is contained in:
@@ -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++) {
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user