tinySA3 touch repaired and HAM_BANDS added

save_scan
erikkaashoek 3 years ago
parent 9f071d5ab1
commit d7586765d7

@ -101,7 +101,7 @@
/* /*
* GPT driver system settings. * GPT driver system settings.
*/ */
#define STM32_GPT_USE_TIM1 TRUE #define STM32_GPT_USE_TIM1 FALSE
#define STM32_GPT_USE_TIM2 FALSE #define STM32_GPT_USE_TIM2 FALSE
#define STM32_GPT_USE_TIM3 TRUE #define STM32_GPT_USE_TIM3 TRUE
#define STM32_GPT_USE_TIM14 TRUE #define STM32_GPT_USE_TIM14 TRUE

@ -85,7 +85,7 @@
#ifdef TINYSA3 #ifdef TINYSA3
#define __HAS_DFU__ #define __HAS_DFU__
#define __MCU_CLOCK_SHIFT__ #define __MCU_CLOCK_SHIFT__
//#define __HAM_BAND__ #define __HAM_BAND__
#endif #endif
#ifdef TINYSA4 #ifdef TINYSA4
#define __BANDS__ #define __BANDS__

12
ui.c

@ -349,8 +349,13 @@ static void touch_init(void){
// Prepare pin for measure touch event // Prepare pin for measure touch event
touch_prepare_sense(); touch_prepare_sense();
// Start touch interrupt, used timer_3 ADC check threshold: // Start touch interrupt, used timer_3 ADC check threshold:
gptStart(&GPTD1, &gpt3cfg); // Init timer 3 #ifdef TINYSA4
gptStartContinuous(&GPTD1, 10); // Start timer 3 vs timer 10 interval gptStart(&GPTD1, &gpt3cfg); // Init timer 1
gptStartContinuous(&GPTD1, 10); // Start timer 1 vs timer 10 interval
#else
gptStart(&GPTD3, &gpt3cfg); // Init timer 3
gptStartContinuous(&GPTD3, 10); // Start timer 3 vs timer 10 interval
#endif
touch_start_watchdog(); // Start ADC watchdog (measure by timer 3 interval and trigger interrupt if touch pressed) touch_start_watchdog(); // Start ADC watchdog (measure by timer 3 interval and trigger interrupt if touch pressed)
} }
@ -4739,6 +4744,9 @@ static const menuitem_t menu_config2[] =
#ifdef TINYSA4 #ifdef TINYSA4
{ MT_SUBMENU, 0, "EXPERT\nCONFIG", menu_settings}, { MT_SUBMENU, 0, "EXPERT\nCONFIG", menu_settings},
#else #else
#ifdef __HAM_BAND__
{ MT_ADV_CALLBACK, 0, "HAM\nBANDS", menu_settings_ham_bands},
#endif
{ MT_SUBMENU, 0, "EXPERT\nCONFIG", menu_settings2}, { MT_SUBMENU, 0, "EXPERT\nCONFIG", menu_settings2},
#endif #endif
{ MT_NONE, 0, NULL, menu_back} // next-> menu_back { MT_NONE, 0, NULL, menu_back} // next-> menu_back

Loading…
Cancel
Save

Powered by TurnKey Linux.