hal: workaround for UART FIFO read on ESP32 with -O2 optimization (backport v4.1) See merge request espressif/esp-idf!12660