chore: auto define navigation type based on keys present (#4893)

This commit is contained in:
3djc
2024-05-27 19:00:31 +10:00
committed by GitHub
parent e807ccbebf
commit 83c325c779
5 changed files with 50 additions and 38 deletions
+14 -2
View File
@@ -97,13 +97,25 @@ enum RotaryEncoderMode {
#define CASE_JACK_DETECT(x)
#endif
#include "debug.h"
#include "myeeprom.h"
#include "curves.h"
// Define navigation type based on available keys
#if LCD_W == 212
#define NAVIGATION_X9D
#elif defined(KEYS_GPIO_REG_LEFT)
#define NAVIGATION_9X
#elif defined(KEYS_GPIO_REG_SHIFT)
#define NAVIGATION_XLITE
#elif defined(KEYS_GPIO_REG_PAGEUP) && defined(KEYS_GPIO_REG_TELE)
#define NAVIGATION_X7
#define NAVIGATION_X7_TX12
#else
#define NAVIGATION_X7
#endif
void memswap(void * a, void * b, uint8_t size);
// TODO: move these config check macros somewhere else