kopia lustrzana https://github.com/OpenRTX/OpenRTX
Automatically disabling the power keep switch when running testsuites, as those may never call platform_terminate()
rodzic
cc2677f8f9
commit
3776b30121
|
@ -60,6 +60,7 @@ main_src = []
|
|||
# Add to sources either the main executable or a platform test
|
||||
if get_option('test') != ''
|
||||
main_src += 'tests/platform/'+get_option('test')+'.c'
|
||||
def += {'DISABLE_KEEP_ON' : ''}
|
||||
else
|
||||
main_src += 'openrtx/src/main.c'
|
||||
endif
|
||||
|
|
|
@ -44,7 +44,9 @@ void platform_init()
|
|||
|
||||
gpio_setMode(PTT_SW, INPUT);
|
||||
|
||||
#ifndef DISABLE_KEEP_ON
|
||||
gpio_setMode(PWR_SW, OUTPUT);
|
||||
#endif
|
||||
|
||||
backlight_init(); /* Initialise backlight driver */
|
||||
audio_init(); /* Initialise audio management module */
|
||||
|
|
|
@ -43,7 +43,9 @@ void platform_init()
|
|||
|
||||
gpio_setMode(PTT_SW, INPUT);
|
||||
|
||||
#ifndef DISABLE_KEEP_ON
|
||||
gpio_setMode(PWR_SW, OUTPUT);
|
||||
#endif
|
||||
|
||||
backlight_init(); /* Initialise backlight driver */
|
||||
audio_init(); /* Initialise audio management module */
|
||||
|
|
|
@ -46,8 +46,10 @@ void platform_init()
|
|||
gpio_setMode(PTT_SW, INPUT_PULL_UP);
|
||||
gpio_setMode(PTT_EXT, INPUT_PULL_UP);
|
||||
|
||||
#ifndef DISABLE_KEEP_ON
|
||||
gpio_setMode(PWR_SW, OUTPUT);
|
||||
gpio_setPin(PWR_SW);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialise ADC1, for vbat, RSSI, ...
|
||||
|
|
|
@ -45,8 +45,10 @@ void platform_init()
|
|||
gpio_setMode(PTT_SW, INPUT_PULL_UP);
|
||||
gpio_setMode(PTT_EXT, INPUT_PULL_UP);
|
||||
|
||||
#ifndef DISABLE_KEEP_ON
|
||||
gpio_setMode(PWR_SW, OUTPUT);
|
||||
gpio_setPin(PWR_SW);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialise ADC1, for vbat, RSSI, ...
|
||||
|
|
Ładowanie…
Reference in New Issue