Skip to content

Commit 801217f

Browse files
committed
fix compile warning
1 parent 6979217 commit 801217f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/lgfx/v1/platforms/esp32/common.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,14 @@ Original Source:
5555
#endif
5656
#endif
5757
#endif
58+
#endif
5859

59-
#if __has_include(<soc/syscon_reg.h>)
60-
#include <soc/syscon_reg.h>
61-
#endif
62-
#else
63-
#if __has_include (<soc/apb_ctrl_reg.h>)
64-
#include <soc/apb_ctrl_reg.h>
65-
#endif
60+
#if __has_include(<soc/syscon_reg.h>)
61+
#include <soc/syscon_reg.h>
62+
#elif __has_include (<soc/apb_ctrl_reg.h>)
63+
#include <soc/apb_ctrl_reg.h>
6664
#endif
65+
6766
#include <soc/efuse_reg.h>
6867

6968
#include <esp_log.h>
@@ -757,6 +756,7 @@ namespace lgfx
757756
#define I2C_ACK_ERR_INT_RAW_M I2C_NACK_INT_RAW_M
758757
#endif
759758

759+
__attribute__ ((unused))
760760
static periph_module_t getPeriphModule(int num)
761761
{
762762
#if SOC_I2C_NUM == 1 || defined CONFIG_IDF_TARGET_ESP32C6
@@ -776,6 +776,7 @@ namespace lgfx
776776
}
777777

778778
#if defined ( I2C_CLOCK_SRC_ATOMIC )
779+
__attribute__ ((unused))
779780
static void i2c_periph_enable(int i2c_num)
780781
{
781782
I2C_RCC_ATOMIC() {
@@ -787,6 +788,7 @@ namespace lgfx
787788
}
788789
}
789790

791+
__attribute__ ((unused))
790792
static void i2c_periph_disable(int i2c_num)
791793
{
792794
// periph_ll_disable_clk_clear_rst(mod);

0 commit comments

Comments
 (0)