admin mode switch
This commit is contained in:
@ -8,7 +8,8 @@ typedef enum {
|
||||
DEBUG_1 = 0,
|
||||
DEBUG_2 = 1,
|
||||
LED_RED = 2,
|
||||
LED_GREEN = 3
|
||||
LED_GREEN = 3,
|
||||
LED_BLUE
|
||||
} signalPin_t;
|
||||
|
||||
typedef enum { ON, OFF, TOGGLE, BLINK } signalAction_t;
|
||||
|
@ -27,6 +27,7 @@ static bool showConfigCmd(uint8_t argc, char **args) {
|
||||
sendFormatString("NTP Server: %s\n\r", configBlock.ntpServer);
|
||||
sendFormatString("deviceId: %s\n\r", configBlock.deviceId);
|
||||
sendFormatString("sharedSecret: (will not be displayed)\n\r");
|
||||
sendFormatString("Sink Server: %s\n\r", configBlock.sinkServer);
|
||||
|
||||
return retCode;
|
||||
}
|
||||
|
@ -40,7 +40,11 @@ void my_setup_2() {
|
||||
|
||||
wizInit();
|
||||
|
||||
cmdHandlerInit();
|
||||
if (HAL_GPIO_ReadPin(ADMIN_MODE_GPIO_Port, ADMIN_MODE_Pin)) {
|
||||
show(LED_BLUE, BLINK);
|
||||
coloredMsg(LED_RED, "STARTING ADMIN MODE");
|
||||
cmdHandlerInit();
|
||||
}
|
||||
|
||||
counterInit();
|
||||
|
||||
|
@ -19,6 +19,7 @@ showElement_t showElement[] = {
|
||||
{ .port = Debug_Signal_2_GPIO_Port, .pin = Debug_Signal_2_Pin, .currentState = OFF },
|
||||
{ .port = LED_Red_GPIO_Port, .pin = LED_Red_Pin, .currentState = OFF },
|
||||
{ .port = LED_Green_GPIO_Port, .pin = LED_Green_Pin, .currentState = OFF },
|
||||
{ .port = LED_Blue_GPIO_Port, .pin = LED_Blue_Pin, .currentState = OFF },
|
||||
{ .port = NULL, .pin = 0, .currentState = OFF }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user