Fix various warnings which become fatal with later gcc versons in esp-idf 5.x (#1268)

- we cannot use partial initialisation of structs in C++ files (copied from example C files initially it seems)
- IRAM_ATTR uses a COUNTER, do not use the attribute on the implementation
- provide missing copy implementations for Rgb and Hsv
- one no longer can |= on volatile variables; use = | instead
- fix project and header includes
- avoid redefining BLINK_GPIO
- Remove defined but unused variables
- Fix printf formats
- Add missing case statement (HTTP_EVENT_REDIRECT)
- RMT needs to be updated to new interface (CONFIG_RMT_SUPPRESS_DEPRECATE_WARN is on currently; see https://docs.espressif.com/projects/esp-idf/en/release-v5.0/esp32/api-reference/peripherals/rmt.html)
- Adjust tcpip_adpater_* to esp_netif_*
- Use buffered versions of *ntoa* functions for IPv4 addresses and not a static on the stack (also fixes warnings)
- Whatever I missed

Co-authored-by: Bjoern A. Zeeb <patch@zabbadoz.net>
This commit is contained in:
bzfbd
2022-11-04 19:06:46 +00:00
committed by GitHub
parent 4ffde22bc6
commit 235861eaea
25 changed files with 194 additions and 92 deletions

View File

@@ -56,10 +56,14 @@
#include <freertos/semphr.h>
#include <soc/dport_reg.h>
#include <soc/gpio_sig_map.h>
#include <soc/gpio_periph.h>
#include <esp32/rom/gpio.h>
#include <soc/rmt_struct.h>
#include <driver/spi_master.h>
#include <driver/rmt.h>
}
#include <stdio.h>
extern rmt_mem_t RMTMEM;
#endif
#include "Color.h"
@@ -131,8 +135,7 @@ public:
initChannel( _channel );
RMT.tx_lim_ch[ _channel ].limit = detail::MAX_PULSES;
RMT.int_ena.val |= 1 << ( 24 + _channel );
RMT.int_ena.val |= 1 << ( 3 * _channel );
RMT.int_ena.val = RMT.int_ena.val | (1 << ( 24 + _channel )) | (1 << ( 3 * _channel ));
_bitToRmt[ 0 ].level0 = 1;
_bitToRmt[ 0 ].level1 = 0;