mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
- Bug fixes - Jack doesn't show as plugged in if no jack detection is configured - New layout - Updated jQuery to latest version - Updated bootstrap to latest version - Updated the command processing backend to support UI interactions - Added a number of accessors to normalize read/update various configuration entries - Added more GPIOs to the status tab GPIO list - Added several configuration sections for hardware and system - Removed pop-over windows from system messages - Added a message count pill to the status tab - Added support for message count pill based on the highest severity - Updated the message list table to set colours based on messages severity - Added command processing message area close to the action buttons to provide feedback from running the commands
66 lines
1.9 KiB
C
66 lines
1.9 KiB
C
/*
|
|
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
|
|
|
Unless required by applicable law or agreed to in writing, this
|
|
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
CONDITIONS OF ANY KIND, either express or implied.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "esp_system.h"
|
|
#include "driver/i2c.h"
|
|
#include "driver/i2s.h"
|
|
#include "driver/spi_master.h"
|
|
extern const char *i2c_name_type;
|
|
extern const char *spi_name_type;
|
|
typedef struct {
|
|
int width;
|
|
int height;
|
|
int address;
|
|
int RST_pin;
|
|
bool hflip;
|
|
bool vflip;
|
|
const char *drivername;
|
|
int CS_pin;
|
|
int speed;
|
|
int back;
|
|
int depth;
|
|
const char *type;
|
|
bool rotate;
|
|
} display_config_t;
|
|
|
|
typedef struct {
|
|
i2s_pin_config_t pin;
|
|
char model[32];
|
|
int mute_gpio;
|
|
int mute_level;
|
|
int i2c_addr;
|
|
int sda;
|
|
int scl;
|
|
} i2s_platform_config_t;
|
|
typedef struct {
|
|
bool fixed;
|
|
char * name;
|
|
char * group;
|
|
int gpio;
|
|
} gpio_entry_t;
|
|
|
|
const display_config_t * config_display_get();
|
|
esp_err_t config_display_set(const display_config_t * config);
|
|
esp_err_t config_i2c_set(const i2c_config_t * config, int port);
|
|
esp_err_t config_i2s_set(const i2s_platform_config_t * config, const char * nvs_name);
|
|
esp_err_t config_spi_set(const spi_bus_config_t * config, int host, int dc);
|
|
const i2c_config_t * config_i2c_get(int * i2c_port);
|
|
const spi_bus_config_t * config_spi_get(spi_host_device_t * spi_host);
|
|
void parse_set_GPIO(void (*cb)(int gpio, char *value));
|
|
const i2s_platform_config_t * config_dac_get();
|
|
const i2s_platform_config_t * config_spdif_get( );
|
|
esp_err_t config_spdif_set(const i2s_platform_config_t * config);
|
|
bool is_spdif_config_locked();
|
|
esp_err_t free_gpio_entry( gpio_entry_t ** gpio);
|
|
gpio_entry_t * get_gpio_by_name(char * name,char * group, bool refresh);
|
|
gpio_entry_t * get_gpio_by_no(int gpionum, bool refresh);
|
|
cJSON * get_gpio_list();
|
|
bool is_dac_config_locked();
|
|
bool are_statistics_enabled(); |