m5stack / M5Dial-UserDemo

M5Dial user demo for hardware evaluation.
MIT License
44 stars 16 forks source link

Demo does not build when using VSCode and ESP_IDF #15

Open MotoBarsteward opened 6 months ago

MotoBarsteward commented 6 months ago
In file included from C:/ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/panel/Panel_M5HDMI.cpp:21:
C:/ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/panel/Panel_M5HDMI.hpp:213:12: error: 'uint8_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
  213 |       std::uint8_t readRegister(std::uint8_t register_address);
      |            ^~~~~~~
      |            wint_t
C:/ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp: In function 'void lgfx::v1::pinMode(int_fast16_t, pin_mode_t)':
C:/ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp:232:34: error: 'uint64_t' is not a member of 'std'; did you mean 'wint_t'?
  232 |     io_conf.pin_bit_mask = (std::uint64_t)1 << pin;
      |                                  ^~~~~~~~
      |                                  wint_t
In file included from C:/ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/panel/Panel_M5HDMI.cpp:21:
C:/ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/panel/Panel_M5HDMI.hpp:213:12: error: 'uint8_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
  213 |       std::uint8_t readRegister(std::uint8_t register_address);
      |            ^~~~~~~
      |            wint_t
C:/ESP-IDF/M5Dial-UserDemo-main/main/hal/rtc/hal_rtc.hpp: In member function 'int PCF8563::PCF8563::setAlarmIRQ(int)':
C:/ESP-IDF/M5Dial-UserDemo-main/main/hal/rtc/hal_rtc.hpp:167:22: error: 'uint8_t' is not a member of 'std'; did you mean 'wint_t'?
  167 |                 std::uint8_t reg_value = _data_buffer[0] & ~0x0C;
      |                      ^~~~~~~
      |                      wint_t

A fix was tested successfully that involved adding #include <cstdint> Before any other includes in the following files... M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/panel/Panel_M5HDMI.hpp M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/panel/Panel_M5HDMI.cpp M5Dial-UserDemo-main/main/hal/rtc/hal_rtc.hpp