From 9db73606236ef09c490b37e6a743cfc227e22dd4 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 16 Feb 2021 13:00:10 +0100 Subject: [PATCH] prepare wifi --- cube/Makefile | 6 +++++- cube/User/Inc/config.h | 4 ++++ cube/User/Src/networkAbstractionLayer_wifi.c | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 cube/User/Src/networkAbstractionLayer_wifi.c diff --git a/cube/Makefile b/cube/Makefile index 9702f96..365e0ae 100644 --- a/cube/Makefile +++ b/cube/Makefile @@ -96,6 +96,10 @@ User/Src/wizHelper.c \ User/Src/networkAbstractionLayer_lan.c endif +ifeq ($(NETWORK), WiFi) +C_SOURCES += \ +User/Src/networkAbstractionLayer_wifi.c +endif # ASM sources ASM_SOURCES = \ @@ -250,4 +254,4 @@ clean: ####################################### -include $(wildcard $(BUILD_DIR)/*.d) -# *** EOF *** +# *** EOF *** diff --git a/cube/User/Inc/config.h b/cube/User/Inc/config.h index 85163a6..28ff8f7 100644 --- a/cube/User/Inc/config.h +++ b/cube/User/Inc/config.h @@ -17,6 +17,10 @@ typedef struct __attribute__((__packed__)) s_configBlock { struct { uint8_t macAddress[6]; } lan; + struct { + char ssid[48]; + char key[65]; // the actual key may have up to 64 chars and has to end with a \0 + } wifi; } networkspecific; uint8_t filler[22]; } t_configBlock; diff --git a/cube/User/Src/networkAbstractionLayer_wifi.c b/cube/User/Src/networkAbstractionLayer_wifi.c new file mode 100644 index 0000000..6f35a37 --- /dev/null +++ b/cube/User/Src/networkAbstractionLayer_wifi.c @@ -0,0 +1,19 @@ +#include +#include + +#include + + + +uint64_t networkSntpQuery() { + return 0; +} + + +int8_t networkUdpSend(char *hostname, uint16_t port, uint8_t *buf, uint16_t bufLen) { + return 0; +} + +void networkImplInit() { + +}