enable power save for esp32 target
This commit is contained in:
@@ -536,7 +536,7 @@ esp_err_t es8388_get_voice_mute(void) {
|
||||
* - (-1) Parameter error
|
||||
* - (0) Success
|
||||
*/
|
||||
esp_err_t es8388_config_dac_output(int output) {
|
||||
esp_err_t es8388_config_dac_output(es_dac_output_t output) {
|
||||
esp_err_t res;
|
||||
uint8_t reg = 0;
|
||||
res = es_read_reg(ES8388_DACPOWER, ®);
|
||||
|
||||
@@ -97,9 +97,9 @@ static esp_err_t pcm51xx_transmit_registers(const pcm51xx_cfg_reg_t *conf_buf,
|
||||
|
||||
esp_err_t pcm51xx_init(audio_hal_codec_config_t *codec_cfg) {
|
||||
esp_err_t ret = ESP_OK;
|
||||
ESP_LOGI(TAG, "Power ON CODEC with GPIO %d", PCM51XX_RST_GPIO);
|
||||
// probably unnecessary...
|
||||
/*
|
||||
ESP_LOGI(TAG, "Power ON CODEC with GPIO %d", PCM51XX_RST_GPIO);
|
||||
gpio_config_t io_conf;
|
||||
io_conf.pin_bit_mask = BIT64(PCM51XX_RST_GPIO);
|
||||
io_conf.mode = GPIO_MODE_OUTPUT;
|
||||
|
||||
@@ -134,7 +134,9 @@ esp_err_t i2c_bus_write_data(i2c_bus_handle_t bus, int addr, uint8_t *data,
|
||||
i2c_cmd_handle_t cmd = i2c_cmd_link_create();
|
||||
ret |= i2c_master_start(cmd);
|
||||
ret |= i2c_master_write_byte(cmd, addr, 1);
|
||||
ret |= i2c_master_write(cmd, data, datalen, I2C_ACK_CHECK_EN);
|
||||
if (datalen) {
|
||||
ret |= i2c_master_write(cmd, data, datalen, I2C_ACK_CHECK_EN);
|
||||
}
|
||||
ret |= i2c_master_stop(cmd);
|
||||
ret |= i2c_master_cmd_begin(p_bus->i2c_port, cmd, 1000 / portTICK_PERIOD_MS);
|
||||
i2c_cmd_link_delete(cmd);
|
||||
|
||||
@@ -19,12 +19,7 @@
|
||||
#include "freertos/task.h"
|
||||
|
||||
#include "hal/gpio_types.h"
|
||||
#include "idf_additions.h"
|
||||
|
||||
#if CONFIG_SNAPCLIENT_USE_INTERNAL_ETHERNET || \
|
||||
CONFIG_SNAPCLIENT_USE_SPI_ETHERNET
|
||||
#include "eth_interface.h"
|
||||
#endif
|
||||
#include "freertos/idf_additions.h"
|
||||
|
||||
#include "board.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
|
||||
Reference in New Issue
Block a user