mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
Merge remote-tracking branch 'origin/master-v4.3' into master-v4.3
This commit is contained in:
@@ -188,13 +188,14 @@ Ground -------------------------- coax signal ground
|
||||
The NVS parameter "display_config" sets the parameters for an optional display. Syntax is
|
||||
```
|
||||
I2C,width=<pixels>,height=<pixels>[address=<i2c_address>][,reset=<gpio>][,HFlip][,VFlip][driver=SSD1306|SSD1326[:1|4]|SSD1327|SH1106]
|
||||
SPI,width=<pixels>,height=<pixels>,cs=<gpio>[,back=<gpio>][,reset=<gpio>][,speed=<speed>][,HFlip][,VFlip][driver=SSD1306|SSD1322|SSD1326[:1|4]|SSD1327|SH1106|SSD1675|ST7735|ST7789|ILI9341[:16|18][,rotate]]
|
||||
SPI,width=<pixels>,height=<pixels>,cs=<gpio>[,back=<gpio>][,reset=<gpio>][,speed=<speed>][,HFlip][,VFlip][driver=SSD1306|SSD1322|SSD1326[:1|4]|SSD1327|SH1106|SSD1675|ST7735|ST7789|ILI9341[:16|18][,rotate]][,mode=<mode>]
|
||||
```
|
||||
- back: a LED backlight used by some older devices (ST7735). It is PWM controlled for brightness
|
||||
- reset: some display have a reset pin that is should normally be pulled up if unused
|
||||
- VFlip and HFlip are optional can be used to change display orientation
|
||||
- rotate: for non-square *drivers*, move to portrait mode. Note that *width* and *height* must be inverted then
|
||||
- Default speed is 8000000 (8MHz) but SPI can work up to 26MHz or even 40MHz
|
||||
- mode: Default mode = 0. Some display modules use different transaction line timings. Check the module documentation if a non-standard mode is required.
|
||||
- SH1106 is 128x64 monochrome I2C/SPI [here]((https://www.waveshare.com/wiki/1.3inch_OLED_HAT))
|
||||
- SSD1306 is 128x32 monochrome I2C/SPI [here](https://www.buydisplay.com/i2c-blue-0-91-inch-oled-display-module-128x32-arduino-raspberry-pi)
|
||||
- SSD1322 is 256x64 grayscale 16-levels SPI in multiple sizes [here](https://www.buydisplay.com/oled-display/oled-display-module?resolution=159) - it is very nice
|
||||
|
||||
@@ -11,7 +11,7 @@ bool GDS_I2CInit( int PortNumber, int SDA, int SCL, int speed );
|
||||
bool GDS_I2CAttachDevice( struct GDS_Device* Device, int Width, int Height, int I2CAddress, int RSTPin, int BacklightPin );
|
||||
|
||||
bool GDS_SPIInit( int SPI, int DC );
|
||||
bool GDS_SPIAttachDevice( struct GDS_Device* Device, int Width, int Height, int CSPin, int RSTPin, int Speed, int BacklightPin );
|
||||
bool GDS_SPIAttachDevice( struct GDS_Device* Device, int Width, int Height, int CSPin, int RSTPin, int Speed, int BacklightPin, int Mode );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ bool GDS_SPIInit( int SPI, int DC ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GDS_SPIAttachDevice( struct GDS_Device* Device, int Width, int Height, int CSPin, int RSTPin, int BackLightPin, int Speed ) {
|
||||
bool GDS_SPIAttachDevice( struct GDS_Device* Device, int Width, int Height, int CSPin, int RSTPin, int BackLightPin, int Speed, int Mode ) {
|
||||
spi_device_interface_config_t SPIDeviceConfig = { };
|
||||
spi_device_handle_t SPIDevice;
|
||||
|
||||
@@ -48,6 +48,7 @@ bool GDS_SPIAttachDevice( struct GDS_Device* Device, int Width, int Height, int
|
||||
SPIDeviceConfig.clock_speed_hz = Speed > 0 ? Speed : SPI_MASTER_FREQ_8M;
|
||||
SPIDeviceConfig.spics_io_num = CSPin;
|
||||
SPIDeviceConfig.queue_size = 1;
|
||||
SPIDeviceConfig.mode = Mode;
|
||||
SPIDeviceConfig.flags = SPI_DEVICE_NO_DUMMY;
|
||||
if (Device->SPIParams) Device->SPIParams(SPIDeviceConfig.clock_speed_hz, &SPIDeviceConfig.mode,
|
||||
&SPIDeviceConfig.cs_ena_pretrans, &SPIDeviceConfig.cs_ena_posttrans);
|
||||
|
||||
@@ -119,14 +119,15 @@ void display_init(char *welcome) {
|
||||
|
||||
ESP_LOGI(TAG, "Display is I2C on port %u", address);
|
||||
} else if (strcasestr(config, "SPI") && spi_system_host != -1) {
|
||||
int CS_pin = -1, speed = 0;
|
||||
int CS_pin = -1, speed = 0, mode = 0;
|
||||
|
||||
PARSE_PARAM(config, "cs", '=', CS_pin);
|
||||
PARSE_PARAM(config, "speed", '=', speed);
|
||||
PARSE_PARAM(config, "mode", '=', mode);
|
||||
|
||||
init = true;
|
||||
GDS_SPIInit( spi_system_host, spi_system_dc_gpio );
|
||||
GDS_SPIAttachDevice( display, width, height, CS_pin, RST_pin, backlight_pin, speed );
|
||||
GDS_SPIAttachDevice( display, width, height, CS_pin, RST_pin, backlight_pin, speed, mode );
|
||||
|
||||
ESP_LOGI(TAG, "Display is SPI host %u with cs:%d", spi_system_host, CS_pin);
|
||||
} else {
|
||||
|
||||
@@ -117,6 +117,14 @@ static void bt_app_task_handler(void *arg)
|
||||
esp_bt_gap_set_security_param(param_type, &iocap, sizeof(uint8_t));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Set default parameters for Legacy Pairing
|
||||
* Use variable pin, input pin code when pairing
|
||||
*/
|
||||
esp_bt_pin_type_t pin_type = ESP_BT_PIN_TYPE_VARIABLE;
|
||||
esp_bt_pin_code_t pin_code;
|
||||
esp_bt_gap_set_pin(pin_type, 0, pin_code);
|
||||
|
||||
running = true;
|
||||
|
||||
while (running) {
|
||||
|
||||
@@ -672,9 +672,9 @@ static void filter_inquiry_scan_result(esp_bt_gap_cb_param_t *param)
|
||||
ESP_LOGV(TAG,"--Invalid class of device. Skipping.\n");
|
||||
return;
|
||||
}
|
||||
else if (!(esp_bt_gap_get_cod_srvc(cod) & ESP_BT_COD_SRVC_RENDERING))
|
||||
else if (!(esp_bt_gap_get_cod_srvc(cod) & (ESP_BT_COD_SRVC_RENDERING | ESP_BT_COD_SRVC_AUDIO)))
|
||||
{
|
||||
ESP_LOGV(TAG,"--Not a rendering device. Skipping.\n");
|
||||
ESP_LOGV(TAG,"--Not a rendering or audio device. Skipping.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,7 @@ static struct {
|
||||
struct arg_int *reset;
|
||||
struct arg_lit *clear;
|
||||
struct arg_lit *invert;
|
||||
struct arg_int *mode;
|
||||
struct arg_end *end;
|
||||
} i2cdisp_args;
|
||||
|
||||
@@ -377,6 +378,13 @@ static int do_i2c_set_display(int argc, char **argv)
|
||||
}
|
||||
/* Check "--cs" option */
|
||||
nerrors +=is_output_gpio(i2cdisp_args.cs,f,&config.CS_pin, false);
|
||||
/* Check "--mode" option */
|
||||
if (i2cdisp_args.mode->count) {
|
||||
config.mode=i2cdisp_args.mode->ival[0];
|
||||
}
|
||||
else {
|
||||
config.mode = 0;
|
||||
}
|
||||
}
|
||||
|
||||
nerrors +=is_output_gpio(i2cdisp_args.reset,f,&config.RST_pin, false);
|
||||
@@ -964,6 +972,9 @@ cJSON * i2c_set_display_cb(){
|
||||
cJSON_AddBoolToObject(values,"hf",conf->hflip);
|
||||
cJSON_AddBoolToObject(values,"vf",conf->vflip);
|
||||
cJSON_AddBoolToObject(values,"invert",conf->invert);
|
||||
if(conf->mode>=0){
|
||||
cJSON_AddNumberToObject(values,"mode",conf->mode);
|
||||
}
|
||||
}
|
||||
return values;
|
||||
}
|
||||
@@ -986,6 +997,7 @@ static void register_i2c_set_display(){
|
||||
i2cdisp_args.rotate = arg_lit0("r", "rotate", "Rotate 180 degrees");
|
||||
i2cdisp_args.invert = arg_lit0("i", "invert", "Invert colors");
|
||||
i2cdisp_args.clear = arg_lit0(NULL, "clear", "clear configuration and return");
|
||||
i2cdisp_args.mode = arg_int0("m", "mode", "<n>","SPI Only. Transaction Line Mode (Default 0)");
|
||||
i2cdisp_args.end = arg_end(8);
|
||||
const esp_console_cmd_t i2c_set_display= {
|
||||
.command = CFG_TYPE_HW("display"),
|
||||
|
||||
@@ -352,6 +352,10 @@ esp_err_t config_display_set(const display_config_t * config){
|
||||
snprintf(config_buffer2,buffer_size,"%s,speed=%i",config_buffer,config->speed);
|
||||
strcpy(config_buffer,config_buffer2);
|
||||
}
|
||||
if(config->mode >=0 && strcasecmp("SPI",config->type)==0){
|
||||
snprintf(config_buffer2,buffer_size,"%s,mode=%i",config_buffer,config->mode);
|
||||
strcpy(config_buffer,config_buffer2);
|
||||
}
|
||||
snprintf(config_buffer2,buffer_size,"%s,driver=%s%s%s%s",config_buffer,config->drivername,config->hflip?",HFlip":"",config->vflip?",VFlip":"",config->rotate?",rotate":"");
|
||||
strcpy(config_buffer,config_buffer2);
|
||||
log_send_messaging(MESSAGING_INFO,"Updating display configuration to %s",config_buffer);
|
||||
@@ -465,6 +469,7 @@ const display_config_t * config_display_get(){
|
||||
.rotate = false,
|
||||
.invert = false,
|
||||
.colorswap = 0,
|
||||
.mode = 0,
|
||||
};
|
||||
char *config = config_alloc_get(NVS_TYPE_STR, "display_config");
|
||||
if (!config) {
|
||||
@@ -484,6 +489,8 @@ const display_config_t * config_display_get(){
|
||||
PARSE_PARAM(config, "address", '=', dstruct.address);
|
||||
PARSE_PARAM(config, "cs", '=', dstruct.CS_pin);
|
||||
PARSE_PARAM(config, "speed", '=', dstruct.speed);
|
||||
PARSE_PARAM(config, "back", '=', dstruct.back);
|
||||
PARSE_PARAM(config, "mode", '=', dstruct.mode);
|
||||
|
||||
if (strstr(config, "I2C") ) dstruct.type=i2c_name_type;
|
||||
if (strstr(config, "SPI") ) dstruct.type=spi_name_type;
|
||||
|
||||
@@ -33,6 +33,7 @@ typedef struct {
|
||||
bool rotate;
|
||||
bool invert;
|
||||
int colorswap;
|
||||
int mode;
|
||||
} display_config_t;
|
||||
|
||||
typedef struct eth_config_struct {
|
||||
|
||||
File diff suppressed because one or more lines are too long
BIN
components/wifi-manager/webapp/dist/index.html.gz
vendored
BIN
components/wifi-manager/webapp/dist/index.html.gz
vendored
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
components/wifi-manager/webapp/dist/js/index.8cb06d.bundle.js.gz
vendored
Normal file
BIN
components/wifi-manager/webapp/dist/js/index.8cb06d.bundle.js.gz
vendored
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -17,6 +17,7 @@ declare function getStatus(): {};
|
||||
declare function getStatus(): {};
|
||||
declare function getStatus(): {};
|
||||
declare function getStatus(): {};
|
||||
declare function getStatus(): {};
|
||||
declare function getRadioButton(entry: any): string;
|
||||
declare function getRadioButton(entry: any): string;
|
||||
declare function getRadioButton(entry: any): string;
|
||||
@@ -36,6 +37,8 @@ declare function getRadioButton(entry: any): string;
|
||||
declare function getRadioButton(entry: any): string;
|
||||
declare function getRadioButton(entry: any): string;
|
||||
declare function getRadioButton(entry: any): string;
|
||||
declare function getRadioButton(entry: any): string;
|
||||
declare function pushStatus(): void;
|
||||
declare function pushStatus(): void;
|
||||
declare function pushStatus(): void;
|
||||
declare function pushStatus(): void;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
target_add_binary_data( __idf_wifi-manager webapp/dist/css/index.7964a13ec910c36040b8.css.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager webapp/dist/favicon-32x32.png BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager webapp/dist/index.html.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager webapp/dist/js/index.fff661.bundle.js.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager webapp/dist/js/node_vendors.fff661.bundle.js.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager webapp/dist/js/index.8cb06d.bundle.js.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager webapp/dist/js/node_vendors.8cb06d.bundle.js.gz BINARY)
|
||||
|
||||
@@ -6,29 +6,29 @@ extern const uint8_t _favicon_32x32_png_start[] asm("_binary_favicon_32x32_png_s
|
||||
extern const uint8_t _favicon_32x32_png_end[] asm("_binary_favicon_32x32_png_end");
|
||||
extern const uint8_t _index_html_gz_start[] asm("_binary_index_html_gz_start");
|
||||
extern const uint8_t _index_html_gz_end[] asm("_binary_index_html_gz_end");
|
||||
extern const uint8_t _index_fff661_bundle_js_gz_start[] asm("_binary_index_fff661_bundle_js_gz_start");
|
||||
extern const uint8_t _index_fff661_bundle_js_gz_end[] asm("_binary_index_fff661_bundle_js_gz_end");
|
||||
extern const uint8_t _node_vendors_fff661_bundle_js_gz_start[] asm("_binary_node_vendors_fff661_bundle_js_gz_start");
|
||||
extern const uint8_t _node_vendors_fff661_bundle_js_gz_end[] asm("_binary_node_vendors_fff661_bundle_js_gz_end");
|
||||
extern const uint8_t _index_8cb06d_bundle_js_gz_start[] asm("_binary_index_8cb06d_bundle_js_gz_start");
|
||||
extern const uint8_t _index_8cb06d_bundle_js_gz_end[] asm("_binary_index_8cb06d_bundle_js_gz_end");
|
||||
extern const uint8_t _node_vendors_8cb06d_bundle_js_gz_start[] asm("_binary_node_vendors_8cb06d_bundle_js_gz_start");
|
||||
extern const uint8_t _node_vendors_8cb06d_bundle_js_gz_end[] asm("_binary_node_vendors_8cb06d_bundle_js_gz_end");
|
||||
const char * resource_lookups[] = {
|
||||
"/css/index.7964a13ec910c36040b8.css.gz",
|
||||
"/favicon-32x32.png",
|
||||
"/index.html.gz",
|
||||
"/js/index.fff661.bundle.js.gz",
|
||||
"/js/node_vendors.fff661.bundle.js.gz",
|
||||
"/js/index.8cb06d.bundle.js.gz",
|
||||
"/js/node_vendors.8cb06d.bundle.js.gz",
|
||||
""
|
||||
};
|
||||
const uint8_t * resource_map_start[] = {
|
||||
_index_7964a13ec910c36040b8_css_gz_start,
|
||||
_favicon_32x32_png_start,
|
||||
_index_html_gz_start,
|
||||
_index_fff661_bundle_js_gz_start,
|
||||
_node_vendors_fff661_bundle_js_gz_start
|
||||
_index_8cb06d_bundle_js_gz_start,
|
||||
_node_vendors_8cb06d_bundle_js_gz_start
|
||||
};
|
||||
const uint8_t * resource_map_end[] = {
|
||||
_index_7964a13ec910c36040b8_css_gz_end,
|
||||
_favicon_32x32_png_end,
|
||||
_index_html_gz_end,
|
||||
_index_fff661_bundle_js_gz_end,
|
||||
_node_vendors_fff661_bundle_js_gz_end
|
||||
_index_8cb06d_bundle_js_gz_end,
|
||||
_node_vendors_8cb06d_bundle_js_gz_end
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/***********************************
|
||||
webpack_headers
|
||||
dist/css/index.7964a13ec910c36040b8.css.gz,dist/favicon-32x32.png,dist/index.html.gz,dist/js/index.fff661.bundle.js.gz,dist/js/node_vendors.fff661.bundle.js.gz
|
||||
dist/css/index.7964a13ec910c36040b8.css.gz,dist/favicon-32x32.png,dist/index.html.gz,dist/js/index.8cb06d.bundle.js.gz,dist/js/node_vendors.8cb06d.bundle.js.gz
|
||||
***********************************/
|
||||
#pragma once
|
||||
#include <inttypes.h>
|
||||
|
||||
BIN
server_certs/DigiCertGlobalRootCA.crt.21
Normal file
BIN
server_certs/DigiCertGlobalRootCA.crt.21
Normal file
Binary file not shown.
BIN
server_certs/rootca1.cer.20
Normal file
BIN
server_certs/rootca1.cer.20
Normal file
Binary file not shown.
Reference in New Issue
Block a user