oled stuff
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
#include <string.h>
|
||||
#include <dhcp.h>
|
||||
#include <show.h>
|
||||
#include <oled.h>
|
||||
|
||||
wiz_NetInfo netInfo = {
|
||||
.mac = { 0x00, 0xA0, 0x57, 0x05, 0x3E, 0x0D },
|
||||
@ -75,6 +76,8 @@ static void wizDHCPAssign() {
|
||||
networkAvailable = true;
|
||||
show(LED_GREEN, ON);
|
||||
coloredMsg(LOG_BLUE, false, "wizda, network is available");
|
||||
|
||||
oledPrint("Address available");
|
||||
}
|
||||
|
||||
static void wizDHCPUpdate() {
|
||||
@ -114,6 +117,7 @@ static void wizPhyLinkHandler(void *handle) {
|
||||
lastStablePhyLink = phyLink;
|
||||
|
||||
if (phyLink == PHY_LINK_ON) {
|
||||
oledPrint("Link available");
|
||||
// start DHCP handler
|
||||
memset(dhcpBuffer, 0, DHCP_BUFFER_SIZE);
|
||||
reg_dhcp_cbfunc(wizDHCPAssign, wizDHCPUpdate, NULL);
|
||||
@ -126,6 +130,8 @@ static void wizPhyLinkHandler(void *handle) {
|
||||
|
||||
dhcpInitialized = true;
|
||||
} else {
|
||||
oledPrint("Link lost");
|
||||
|
||||
networkAvailable = false;
|
||||
show(LED_GREEN, BLINK);
|
||||
coloredMsg(LOG_BLUE, false, "wizplh, network is unavailable");
|
||||
|
Reference in New Issue
Block a user