Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
f77ce040
Commit
f77ce040
authored
Aug 20, 2024
by
me-no-dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(build): Fix many warnings
parent
e1673e4c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
35 deletions
+37
-35
cores/esp32/esp32-hal-cpu.c
cores/esp32/esp32-hal-cpu.c
+4
-4
cores/esp32/esp32-hal-misc.c
cores/esp32/esp32-hal-misc.c
+5
-5
libraries/BluetoothSerial/src/BluetoothSerial.cpp
libraries/BluetoothSerial/src/BluetoothSerial.cpp
+1
-1
libraries/ESP_I2S/src/ESP_I2S.cpp
libraries/ESP_I2S/src/ESP_I2S.cpp
+1
-1
libraries/Ethernet/src/ETH.cpp
libraries/Ethernet/src/ETH.cpp
+2
-2
libraries/SD_MMC/src/SD_MMC.cpp
libraries/SD_MMC/src/SD_MMC.cpp
+2
-1
libraries/WiFi/src/WiFiGeneric.cpp
libraries/WiFi/src/WiFiGeneric.cpp
+22
-21
No files found.
cores/esp32/esp32-hal-cpu.c
View file @
f77ce040
...
...
@@ -21,7 +21,7 @@
#include "soc/rtc.h"
#if !defined(CONFIG_IDF_TARGET_ESP32C2) && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32H2)
#include "soc/rtc_cntl_reg.h"
#include "soc/
apb_ctrl
_reg.h"
#include "soc/
syscon
_reg.h"
#endif
#include "soc/efuse_reg.h"
#include "esp32-hal.h"
...
...
@@ -30,13 +30,13 @@
#include "esp_system.h"
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
#include "
freertos/
xtensa_timer.h"
#include "xtensa_timer.h"
#include "esp32/rom/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "
freertos/
xtensa_timer.h"
#include "xtensa_timer.h"
#include "esp32s2/rom/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "
freertos/
xtensa_timer.h"
#include "xtensa_timer.h"
#include "esp32s3/rom/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/rtc.h"
...
...
cores/esp32/esp32-hal-misc.c
View file @
f77ce040
...
...
@@ -31,7 +31,7 @@
#include "soc/rtc.h"
#if !defined(CONFIG_IDF_TARGET_ESP32C2) && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32H2)
#include "soc/rtc_cntl_reg.h"
#include "soc/
apb_ctrl
_reg.h"
#include "soc/
syscon
_reg.h"
#endif
#include "esp_task_wdt.h"
#include "esp32-hal.h"
...
...
@@ -147,14 +147,14 @@ void feedLoopWDT() {
#endif
void
enableCore0WDT
()
{
TaskHandle_t
idle_0
=
xTaskGetIdleTaskHandleForC
PU
(
0
);
TaskHandle_t
idle_0
=
xTaskGetIdleTaskHandleForC
ore
(
0
);
if
(
idle_0
==
NULL
||
esp_task_wdt_add
(
idle_0
)
!=
ESP_OK
)
{
log_e
(
"Failed to add Core 0 IDLE task to WDT"
);
}
}
void
disableCore0WDT
()
{
TaskHandle_t
idle_0
=
xTaskGetIdleTaskHandleForC
PU
(
0
);
TaskHandle_t
idle_0
=
xTaskGetIdleTaskHandleForC
ore
(
0
);
if
(
idle_0
==
NULL
||
esp_task_wdt_delete
(
idle_0
)
!=
ESP_OK
)
{
log_e
(
"Failed to remove Core 0 IDLE task from WDT"
);
}
...
...
@@ -162,14 +162,14 @@ void disableCore0WDT() {
#ifndef CONFIG_FREERTOS_UNICORE
void
enableCore1WDT
()
{
TaskHandle_t
idle_1
=
xTaskGetIdleTaskHandleForC
PU
(
1
);
TaskHandle_t
idle_1
=
xTaskGetIdleTaskHandleForC
ore
(
1
);
if
(
idle_1
==
NULL
||
esp_task_wdt_add
(
idle_1
)
!=
ESP_OK
)
{
log_e
(
"Failed to add Core 1 IDLE task to WDT"
);
}
}
void
disableCore1WDT
()
{
TaskHandle_t
idle_1
=
xTaskGetIdleTaskHandleForC
PU
(
1
);
TaskHandle_t
idle_1
=
xTaskGetIdleTaskHandleForC
ore
(
1
);
if
(
idle_1
==
NULL
||
esp_task_wdt_delete
(
idle_1
)
!=
ESP_OK
)
{
log_e
(
"Failed to remove Core 1 IDLE task from WDT"
);
}
...
...
libraries/BluetoothSerial/src/BluetoothSerial.cpp
View file @
f77ce040
...
...
@@ -698,7 +698,7 @@ static bool _init_bt(const char *deviceName, bt_mode mode) {
}
log_i
(
"device name set"
);
esp_bt_
dev
_set_device_name
(
deviceName
);
esp_bt_
gap
_set_device_name
(
deviceName
);
if
(
_enableSSP
)
{
log_i
(
"Simple Secure Pairing"
);
...
...
libraries/ESP_I2S/src/ESP_I2S.cpp
View file @
f77ce040
...
...
@@ -12,7 +12,7 @@
#define I2S_READ_CHUNK_SIZE 1920
#define I2S_DEFAULT_CFG() \
{ .id = I2S_NUM_AUTO, .role = I2S_ROLE_MASTER, .dma_desc_num = 6, .dma_frame_num = 240, .auto_clear = true, }
{ .id = I2S_NUM_AUTO, .role = I2S_ROLE_MASTER, .dma_desc_num = 6, .dma_frame_num = 240, .auto_clear = true,
.auto_clear_before_cb = false, .intr_priority = 0
}
#define I2S_STD_CHAN_CFG(_sample_rate, _data_bit_width, _slot_mode) \
{ \
...
...
libraries/Ethernet/src/ETH.cpp
View file @
f77ce040
...
...
@@ -181,8 +181,8 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i
:
(
2
==
clock_mode
)
?
EMAC_CLK_OUT_GPIO
:
(
3
==
clock_mode
)
?
EMAC_CLK_OUT_180_GPIO
:
EMAC_CLK_IN_GPIO
;
mac_config
.
smi_
mdc_gpio
_num
=
digitalPinToGPIONumber
(
mdc
);
mac_config
.
smi_
mdio_gp
io_num
=
digitalPinToGPIONumber
(
mdio
);
mac_config
.
smi_
gpio
.
mdc
_num
=
digitalPinToGPIONumber
(
mdc
);
mac_config
.
smi_
gpio
.
md
io_num
=
digitalPinToGPIONumber
(
mdio
);
_pin_mcd
=
digitalPinToGPIONumber
(
mdc
);
_pin_mdio
=
digitalPinToGPIONumber
(
mdio
);
...
...
libraries/SD_MMC/src/SD_MMC.cpp
View file @
f77ce040
...
...
@@ -175,7 +175,8 @@ bool SDMMCFS::begin(const char *mountpoint, bool mode1bit, bool format_if_mount_
_mode1bit
=
mode1bit
;
esp_vfs_fat_sdmmc_mount_config_t
mount_config
=
{
.
format_if_mount_failed
=
format_if_mount_failed
,
.
max_files
=
maxOpenFiles
,
.
allocation_unit_size
=
0
,
.
disk_status_check_enable
=
false
.
format_if_mount_failed
=
format_if_mount_failed
,
.
max_files
=
maxOpenFiles
,
.
allocation_unit_size
=
0
,
.
disk_status_check_enable
=
false
,
.
use_one_fat
=
false
};
esp_err_t
ret
=
esp_vfs_fat_sdmmc_mount
(
mountpoint
,
&
host
,
&
slot_config
,
&
mount_config
,
&
_card
);
...
...
libraries/WiFi/src/WiFiGeneric.cpp
View file @
f77ce040
...
...
@@ -39,6 +39,7 @@ extern "C" {
#include <esp_event.h>
#include <esp_mac.h>
#include <esp_netif.h>
#include <esp_phy.h>
#include "lwip/ip_addr.h"
#include "lwip/opt.h"
#include "lwip/err.h"
...
...
@@ -693,9 +694,9 @@ bool WiFiGenericClass::initiateFTM(uint8_t frm_count, uint16_t burst_period, uin
*/
bool
WiFiGenericClass
::
setDualAntennaConfig
(
uint8_t
gpio_ant1
,
uint8_t
gpio_ant2
,
wifi_rx_ant_t
rx_mode
,
wifi_tx_ant_t
tx_mode
)
{
wifi
_ant_gpio_config_t
wifi_ant_io
;
esp_phy
_ant_gpio_config_t
wifi_ant_io
;
if
(
ESP_OK
!=
esp_
wifi
_get_ant_gpio
(
&
wifi_ant_io
))
{
if
(
ESP_OK
!=
esp_
phy
_get_ant_gpio
(
&
wifi_ant_io
))
{
log_e
(
"Failed to get antenna configuration"
);
return
false
;
}
...
...
@@ -705,56 +706,56 @@ bool WiFiGenericClass::setDualAntennaConfig(uint8_t gpio_ant1, uint8_t gpio_ant2
wifi_ant_io
.
gpio_cfg
[
1
].
gpio_num
=
gpio_ant2
;
wifi_ant_io
.
gpio_cfg
[
1
].
gpio_select
=
1
;
if
(
ESP_OK
!=
esp_
wifi
_set_ant_gpio
(
&
wifi_ant_io
))
{
if
(
ESP_OK
!=
esp_
phy
_set_ant_gpio
(
&
wifi_ant_io
))
{
log_e
(
"Failed to set antenna GPIO configuration"
);
return
false
;
}
// Set antenna default configuration
wifi
_ant_config_t
ant_config
=
{
.
rx_ant_mode
=
WIFI
_ANT_MODE_AUTO
,
.
rx_ant_default
=
WIFI
_ANT_MAX
,
// Ignored in AUTO mode
.
tx_ant_mode
=
WIFI
_ANT_MODE_AUTO
,
esp_phy
_ant_config_t
ant_config
=
{
.
rx_ant_mode
=
ESP_PHY
_ANT_MODE_AUTO
,
.
rx_ant_default
=
ESP_PHY
_ANT_MAX
,
// Ignored in AUTO mode
.
tx_ant_mode
=
ESP_PHY
_ANT_MODE_AUTO
,
.
enabled_ant0
=
1
,
.
enabled_ant1
=
2
,
};
switch
(
rx_mode
)
{
case
WIFI_RX_ANT0
:
ant_config
.
rx_ant_mode
=
WIFI
_ANT_MODE_ANT0
;
break
;
case
WIFI_RX_ANT1
:
ant_config
.
rx_ant_mode
=
WIFI
_ANT_MODE_ANT1
;
break
;
case
WIFI_RX_ANT0
:
ant_config
.
rx_ant_mode
=
ESP_PHY
_ANT_MODE_ANT0
;
break
;
case
WIFI_RX_ANT1
:
ant_config
.
rx_ant_mode
=
ESP_PHY
_ANT_MODE_ANT1
;
break
;
case
WIFI_RX_ANT_AUTO
:
log_i
(
"TX Antenna will be automatically selected"
);
ant_config
.
rx_ant_default
=
WIFI
_ANT_ANT0
;
ant_config
.
rx_ant_mode
=
WIFI
_ANT_MODE_AUTO
;
ant_config
.
rx_ant_default
=
ESP_PHY
_ANT_ANT0
;
ant_config
.
rx_ant_mode
=
ESP_PHY
_ANT_MODE_AUTO
;
// Force TX for AUTO if RX is AUTO
ant_config
.
tx_ant_mode
=
WIFI
_ANT_MODE_AUTO
;
ant_config
.
tx_ant_mode
=
ESP_PHY
_ANT_MODE_AUTO
;
goto
set_ant
;
break
;
default:
log_e
(
"Invalid default antenna! Falling back to AUTO"
);
ant_config
.
rx_ant_mode
=
WIFI
_ANT_MODE_AUTO
;
ant_config
.
rx_ant_mode
=
ESP_PHY
_ANT_MODE_AUTO
;
break
;
}
switch
(
tx_mode
)
{
case
WIFI_TX_ANT0
:
ant_config
.
tx_ant_mode
=
WIFI
_ANT_MODE_ANT0
;
break
;
case
WIFI_TX_ANT1
:
ant_config
.
tx_ant_mode
=
WIFI
_ANT_MODE_ANT1
;
break
;
case
WIFI_TX_ANT0
:
ant_config
.
tx_ant_mode
=
ESP_PHY
_ANT_MODE_ANT0
;
break
;
case
WIFI_TX_ANT1
:
ant_config
.
tx_ant_mode
=
ESP_PHY
_ANT_MODE_ANT1
;
break
;
case
WIFI_TX_ANT_AUTO
:
log_i
(
"RX Antenna will be automatically selected"
);
ant_config
.
rx_ant_default
=
WIFI
_ANT_ANT0
;
ant_config
.
tx_ant_mode
=
WIFI
_ANT_MODE_AUTO
;
ant_config
.
rx_ant_default
=
ESP_PHY
_ANT_ANT0
;
ant_config
.
tx_ant_mode
=
ESP_PHY
_ANT_MODE_AUTO
;
// Force RX for AUTO if RX is AUTO
ant_config
.
rx_ant_mode
=
WIFI
_ANT_MODE_AUTO
;
ant_config
.
rx_ant_mode
=
ESP_PHY
_ANT_MODE_AUTO
;
break
;
default:
log_e
(
"Invalid default antenna! Falling back to AUTO"
);
ant_config
.
rx_ant_default
=
WIFI
_ANT_ANT0
;
ant_config
.
tx_ant_mode
=
WIFI
_ANT_MODE_AUTO
;
ant_config
.
rx_ant_default
=
ESP_PHY
_ANT_ANT0
;
ant_config
.
tx_ant_mode
=
ESP_PHY
_ANT_MODE_AUTO
;
break
;
}
set_ant:
if
(
ESP_OK
!=
esp_
wifi
_set_ant
(
&
ant_config
))
{
if
(
ESP_OK
!=
esp_
phy
_set_ant
(
&
ant_config
))
{
log_e
(
"Failed to set antenna configuration"
);
return
false
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment