From 899e7e01d45f0c6b9f7c4d216a2eb45af1fd550b Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Sat, 6 Mar 2021 08:59:42 +0100 Subject: [PATCH] Removed more low quality code to fix warnings --- Kconfig.projbuild | 79 ------------------------------------- cores/esp32/esp32-hal.h | 8 ---- libraries/Wire/src/Wire.cpp | 30 -------------- libraries/Wire/src/Wire.h | 8 +--- 4 files changed, 1 insertion(+), 124 deletions(-) diff --git a/Kconfig.projbuild b/Kconfig.projbuild index fdb4e0a0..bb24e2de 100644 --- a/Kconfig.projbuild +++ b/Kconfig.projbuild @@ -9,58 +9,6 @@ config ENABLE_ARDUINO_DEPENDS select MEMMAP_SMP default "y" -config AUTOSTART_ARDUINO - bool "Autostart Arduino setup and loop on boot" - default "n" - help - Enabling this option will implement app_main and start Arduino. - All you need to implement in your main.cpp is setup() and loop() - and include Arduino.h - If disabled, you can call initArduino() to run any preparations - required by the framework - -choice ARDUINO_RUNNING_CORE - bool "Core on which Arduino's setup() and loop() are running" - default ARDUINO_RUN_CORE1 - help - Select on which core Arduino's setup() and loop() functions run - - config ARDUINO_RUN_CORE0 - bool "CORE 0" - config ARDUINO_RUN_CORE1 - bool "CORE 1" - config ARDUINO_RUN_NO_AFFINITY - bool "BOTH" - -endchoice - -config ARDUINO_RUNNING_CORE - int - default 0 if ARDUINO_RUN_CORE0 - default 1 if ARDUINO_RUN_CORE1 - default -1 if ARDUINO_RUN_NO_AFFINITY - -choice ARDUINO_EVENT_RUNNING_CORE - bool "Core on which Arduino's event handler is running" - default ARDUINO_EVENT_RUN_CORE1 - help - Select on which core Arduino's WiFi.onEvent() run - - config ARDUINO_EVENT_RUN_CORE0 - bool "CORE 0" - config ARDUINO_EVENT_RUN_CORE1 - bool "CORE 1" - config ARDUINO_EVENT_RUN_NO_AFFINITY - bool "BOTH" - -endchoice - -config ARDUINO_EVENT_RUNNING_CORE - int - default 0 if ARDUINO_EVENT_RUN_CORE0 - default 1 if ARDUINO_EVENT_RUN_CORE1 - default -1 if ARDUINO_EVENT_RUN_NO_AFFINITY - config ARDUINO_ISR_IRAM bool "Run interrupts in IRAM" default "n" @@ -130,33 +78,6 @@ config ARDUHAL_ESP_LOG endmenu -choice ARDUHAL_PARTITION_SCHEME - bool "Used partition scheme" - default ARDUHAL_PARTITION_SCHEME_DEFAULT - help - Specify which partition scheme to be used. - -config ARDUHAL_PARTITION_SCHEME_DEFAULT - bool "Default" -config ARDUHAL_PARTITION_SCHEME_MINIMAL - bool "Minimal (for 2MB FLASH)" -config ARDUHAL_PARTITION_SCHEME_NO_OTA - bool "No OTA (for large apps)" -config ARDUHAL_PARTITION_SCHEME_HUGE_APP - bool "Huge App (for very large apps)" -config ARDUHAL_PARTITION_SCHEME_MIN_SPIFFS - bool "Minimal SPIFFS (for large apps with OTA)" -endchoice - -config ARDUHAL_PARTITION_SCHEME - string - default "default" if ARDUHAL_PARTITION_SCHEME_DEFAULT - default "minimal" if ARDUHAL_PARTITION_SCHEME_MINIMAL - default "no_ota" if ARDUHAL_PARTITION_SCHEME_NO_OTA - default "huge_app" if ARDUHAL_PARTITION_SCHEME_HUGE_APP - default "min_spiffs" if ARDUHAL_PARTITION_SCHEME_MIN_SPIFFS - - config ARDUINO_SELECTIVE_COMPILATION bool "Include only specific Arduino libraries" default n diff --git a/cores/esp32/esp32-hal.h b/cores/esp32/esp32-hal.h index 8d9f37db..577dc79e 100644 --- a/cores/esp32/esp32-hal.h +++ b/cores/esp32/esp32-hal.h @@ -52,14 +52,6 @@ extern "C" { #define ARDUINO_ISR_FLAG (0) #endif -#ifndef ARDUINO_RUNNING_CORE -#define ARDUINO_RUNNING_CORE CONFIG_ARDUINO_RUNNING_CORE -#endif - -#ifndef ARDUINO_EVENT_RUNNING_CORE -#define ARDUINO_EVENT_RUNNING_CORE CONFIG_ARDUINO_EVENT_RUNNING_CORE -#endif - //forward declaration from freertos/portmacro.h void vPortYield(void); void yield(void); diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp index 4dc881dc..7640aa09 100644 --- a/libraries/Wire/src/Wire.cpp +++ b/libraries/Wire/src/Wire.cpp @@ -289,36 +289,6 @@ void TwoWire::flush(void) i2cFlush(i2c); // cleanup } -uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint8_t sendStop) -{ - return requestFrom(static_cast(address), static_cast(quantity), static_cast(sendStop)); -} - -uint8_t TwoWire::requestFrom(uint16_t address, uint8_t quantity, uint8_t sendStop) -{ - return requestFrom(address, static_cast(quantity), static_cast(sendStop)); -} - -uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity) -{ - return requestFrom(static_cast(address), static_cast(quantity), true); -} - -uint8_t TwoWire::requestFrom(uint16_t address, uint8_t quantity) -{ - return requestFrom(address, static_cast(quantity), true); -} - -uint8_t TwoWire::requestFrom(int address, int quantity) -{ - return requestFrom(static_cast(address), static_cast(quantity), true); -} - -uint8_t TwoWire::requestFrom(int address, int quantity, int sendStop) -{ - return static_cast(requestFrom(static_cast(address), static_cast(quantity), static_cast(sendStop))); -} - void TwoWire::beginTransmission(int address) { beginTransmission(static_cast(address)); diff --git a/libraries/Wire/src/Wire.h b/libraries/Wire/src/Wire.h index 5cebcd10..1f621350 100644 --- a/libraries/Wire/src/Wire.h +++ b/libraries/Wire/src/Wire.h @@ -94,13 +94,7 @@ public: uint8_t endTransmission(bool sendStop); uint8_t endTransmission(void); - uint8_t requestFrom(uint16_t address, uint8_t size, bool sendStop); - uint8_t requestFrom(uint16_t address, uint8_t size, uint8_t sendStop); - uint8_t requestFrom(uint16_t address, uint8_t size); - uint8_t requestFrom(uint8_t address, uint8_t size, uint8_t sendStop); - uint8_t requestFrom(uint8_t address, uint8_t size); - uint8_t requestFrom(int address, int size, int sendStop); - uint8_t requestFrom(int address, int size); + uint8_t requestFrom(uint16_t address, uint8_t size, bool sendStop=true); size_t write(uint8_t); size_t write(const uint8_t *, size_t);