summaryrefslogtreecommitdiff
path: root/polux
diff options
context:
space:
mode:
Diffstat (limited to 'polux')
-rw-r--r--polux/application/safe-return/safe-return.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/polux/application/safe-return/safe-return.c b/polux/application/safe-return/safe-return.c
index c19a2131e6..8240077f6a 100644
--- a/polux/application/safe-return/safe-return.c
+++ b/polux/application/safe-return/safe-return.c
@@ -107,6 +107,7 @@ static void reset_defaults(void)
#define PIN_CHOSE 1
#elif defined(SP_LISA)
#define PIN_CHOSE 6
+#define RESET_BUTTON_PRESSED() !(CSP_PIO_GET_PDSR(CSP_PIO_BASE)&(1<<PIN_CHOSE))
#endif
static void Reset_by_button (void)
{
@@ -136,7 +137,7 @@ static void Reset_by_button (void)
for ( timeout= 50; timeout ; timeout--)
{
// Low state waiting on input.
- if(!(CSP_PIO_GET_PDSR(CSP_PIO_BASE)&(1<<PIN_CHOSE)))
+ if(RESET_BUTTON_PRESSED())
{
reset_defaults ();
break;