Add Jumper t12 support by 3djc (#6451)

* Jumper T12 - companion part

* more work

* Add definitions

* fix libsimulator key handling

* Fix simu keys handling

* Cosmetics

* Continued

* Fix wrong regplace

* Fix wrong regplace

* Please travis

* Please travis

* Add T12 to Travis
Switch naming and display

* Cosmetics

* Work on modules

* Work on modules

* typo

* Fix navigation

* Cosmetics

* Introduce NAVIGATION_type

* Fix

* Make NAVIGATION_type more future proof

* Lots of cleanups and improvements

* Cosmetics

* Fix internal module menu

* Cosmetics

* Fix screen reversed

* Small fixes

* Fix navigation issue

* Please travis

* Fix LCD contrast

* Fix T12 switch layout

* Fix T12 keys screen and all radios keys translations

* Complete rework of SWITCHES screen for all radios

* comsetics

* VC++ compilation
This commit is contained in:
3djc
2019-05-26 19:51:17 +02:00
committed by Andre Bernet
parent f0998ff52f
commit cd3c4ac654
80 changed files with 975 additions and 208 deletions
+37 -12
View File
@@ -94,6 +94,13 @@ extern "C" {
}
#endif
#if defined(PCBX9E) || defined(RADIO_X7) || defined(PCBX9LITE)
// Rotary Encoder driver
#define ROTARY_ENCODER_NAVIGATION
void rotaryEncoderInit(void);
void rotaryEncoderCheck(void);
#endif
#define FLASHSIZE 0x80000
#define BOOTLOADER_SIZE 0x8000
#define FIRMWARE_ADDRESS 0x08000000
@@ -184,7 +191,11 @@ uint32_t isBootloaderStart(const uint8_t * buffer);
#define EXTERNAL_MODULE_OFF() EXTERNAL_MODULE_PWR_OFF()
#endif
#if defined(RADIO_T12)
#define IS_INTERNAL_MODULE_ON() false
#else
#define IS_INTERNAL_MODULE_ON() (GPIO_ReadInputDataBit(INTMODULE_PWR_GPIO, INTMODULE_PWR_GPIO_PIN) == Bit_SET)
#endif
void init_ppm(uint8_t module);
void disable_ppm(uint8_t module);
@@ -263,24 +274,45 @@ int sbusGetByte(uint8_t * byte);
// Keys driver
enum EnumKeys
{
#if defined(PCBXLITE)
#if defined(KEYS_GPIO_REG_SHIFT)
KEY_SHIFT,
#else
#endif
#if defined(KEYS_GPIO_REG_MENU)
KEY_MENU,
#endif
KEY_EXIT,
KEY_ENTER,
#if defined(PCBXLITE)
#if defined(KEYS_GPIO_REG_DOWN)
KEY_DOWN,
KEY_UP,
#endif
#if defined(KEYS_GPIO_REG_RIGHT)
KEY_RIGHT,
KEY_LEFT,
#else
#endif
#if defined(KEYS_GPIO_REG_PAGE)
KEY_PAGE,
#endif
#if defined(KEYS_GPIO_REG_PLUS)
KEY_PLUS,
KEY_MINUS,
#endif
KEY_COUNT,
KEY_MAX = KEY_COUNT - 1,
#if defined(ROTARY_ENCODER_NAVIGATION)
KEY_PLUS,
KEY_MINUS,
#endif
TRM_BASE,
TRM_LH_DWN = TRM_BASE,
TRM_LH_UP,
@@ -300,7 +332,7 @@ enum EnumKeys
#define KEY_DOWN KEY_PLUS
#define KEY_RIGHT KEY_PLUS
#define KEY_LEFT KEY_MINUS
#elif defined(PCBXLITE)
#elif defined(NAVIGATION_XLITE)
#define KEY_PLUS KEY_RIGHT
#define KEY_MINUS KEY_LEFT
#else
@@ -435,13 +467,6 @@ uint32_t readTrims(void);
#define TRIMS_PRESSED() (readTrims())
#define KEYS_PRESSED() (readKeys())
#if defined(PCBX9E) || defined(PCBX7) || defined(PCBX9LITE)
// Rotary Encoder driver
#define ROTARY_ENCODER_NAVIGATION
void rotaryEncoderInit(void);
void rotaryEncoderCheck(void);
#endif
// WDT driver
#define WDTO_500MS 500
#if defined(WATCHDOG_DISABLED) || defined(SIMU)