led green blinking on network status

This commit is contained in:
2020-11-17 15:04:34 +01:00
parent fb04857772
commit eb64cc8dce
5 changed files with 48 additions and 51 deletions

View File

@ -1,5 +1,4 @@
#include <wizHelper.h>
#include <stdint.h>
#include <main2.h>
#include <spi.h>
@ -10,7 +9,7 @@
#include <wizchip_conf.h>
#include <string.h>
#include <dhcp.h>
#include <show.h>
wiz_NetInfo netInfo = {
.mac = { 0x00, 0xA0, 0x57, 0x05, 0x3E, 0x0D },
@ -74,6 +73,7 @@ static void wizDHCPAssign() {
coloredMsg(LOG_BLUE, false, "wizda, set netinfo again");
networkAvailable = true;
show(LED_GREEN, ON);
coloredMsg(LOG_BLUE, false, "wizda, network is available");
}
@ -127,6 +127,7 @@ static void wizPhyLinkHandler(void *handle) {
dhcpInitialized = true;
} else {
networkAvailable = false;
show(LED_GREEN, BLINK);
coloredMsg(LOG_BLUE, false, "wizplh, network is unavailable");
// stop DHCP handler