Skip to content

Commit

Permalink
Fix ESP32C6 compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed May 16, 2024
1 parent f2a1028 commit 3d24bcc
Show file tree
Hide file tree
Showing 45 changed files with 135 additions and 45 deletions.
4 changes: 3 additions & 1 deletion examples/ArduinoLoRa/LoRaReceiver/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/ArduinoLoRa/LoRaSender/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/Display/Free_Font_Demo/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/Display/TBeam_TFT_Shield/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/Display/TFT_Char_times/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/Display/UTFT_demo/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/GPS/TinyGPS_Example/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/GPS/TinyGPS_FullExample/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/GPS/TinyGPS_KitchenSink/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/GPS/UBlox_BasicNMEARead/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/GPS/UBlox_NMEAParsing/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/GPS/UBlox_OutputRate/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/GPS/UBlox_Recovery/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/LoRaWAN/LMIC_Library_OTTA/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/LoRaWAN/RadioLib_ABP/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/OLED/SH1106FontUsage/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/OLED/SH1106GraphicsTest/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/OLED/SH1106IconMenu/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/OLED/SH1106PrintUTF8/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/OLED/SSD1306SimpleDemo/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/OLED/SSD1306UiDemo/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/PMU/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/RadioLibExamples/Receive_Interrupt/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/RadioLibExamples/Transmit_Interrupt/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/Sensor/BME280_AdvancedsettingsExample/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/Sensor/BME280_TestExample/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/Sensor/BME280_UnifiedExample/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/Sensor/PCF8563_AlarmByUnits/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/Sensor/PCF8563_SimpleTime/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
4 changes: 3 additions & 1 deletion examples/Sensor/PCF8563_TimeLib/LoRaBoards.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ void printResult(bool radio_online);

void flashLed();

#ifdef HAS_PMU
extern XPowersLibInterface *PMU;
extern DISPLAY_MODEL *u8g2;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;

#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) ( u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
Expand Down
Loading

0 comments on commit 3d24bcc

Please sign in to comment.