aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/libboard
diff options
context:
space:
mode:
authorKévin Redon <kredon@sysmocom.de>2018-09-04 16:15:10 +0200
committerKévin Redon <kredon@sysmocom.de>2018-09-04 16:15:15 +0200
commit1dbcf62295cb7932d1e84ee02d27b22746aa1510 (patch)
treecc44fd1a7830aa05368d9ca28a3934f70c64cfe2 /firmware/libboard
parente5f891a825f6d6c29ffc64bb7738df378be0b586 (diff)
qmod: add LED user control
this is used during board testing Change-Id: I4ccd787f6e307f523821725de158e3c6f1508ee2
Diffstat (limited to 'firmware/libboard')
-rw-r--r--firmware/libboard/qmod/source/board_qmod.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c
index dcfe17f..9073489 100644
--- a/firmware/libboard/qmod/source/board_qmod.c
+++ b/firmware/libboard/qmod/source/board_qmod.c
@@ -19,6 +19,7 @@
#include "board.h"
#include "simtrace.h"
#include "utils.h"
+#include "led.h"
#include "wwan_led.h"
#include "wwan_perst.h"
#include "sim_switch.h"
@@ -186,6 +187,10 @@ void board_exec_dbg_cmd(int ch)
case '?':
printf("\t?\thelp\n\r");
printf("\tR\treset SAM3\n\r");
+ printf("\tl\tswitch off LED 1\n\r");
+ printf("\tL\tswitch off LED 1\n\r");
+ printf("\tg\tswitch off LED 2\n\r");
+ printf("\tG\tswitch off LED 2\n\r");
if (qmod_sam3_is_12()) {
printf("\tE\tprogram EEPROM\n\r");
printf("\te\tErase EEPROM\n\r");
@@ -209,6 +214,22 @@ void board_exec_dbg_cmd(int ch)
USBD_Disconnect();
NVIC_SystemReset();
break;
+ case 'l':
+ led_blink(LED_GREEN, BLINK_ALWAYS_OFF);
+ printf("LED 1 switched off\n\r");
+ break;
+ case 'L':
+ led_blink(LED_GREEN, BLINK_ALWAYS_ON);
+ printf("LED 1 switched on\n\r");
+ break;
+ case 'g':
+ led_blink(LED_RED, BLINK_ALWAYS_OFF);
+ printf("LED 2 switched off\n\r");
+ break;
+ case 'G':
+ led_blink(LED_RED, BLINK_ALWAYS_ON);
+ printf("LED 2 switched on\n\r");
+ break;
case 'X':
printf("Clearing _SIMTRACExx_RST -> SIMTRACExx_RST high (inactive)\n\r");
PIO_Clear(&pin_peer_rst);