add network abstraction layer

This commit is contained in:
Wolfgang Hottgenroth 2021-02-16 10:37:09 +01:00
parent e9b60d4058
commit bfbcc309df
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F
4 changed files with 29 additions and 4 deletions

View File

@ -15,7 +15,11 @@
# ------------------------------------------------
NETWORK = LAN
# LAN = 1
# WiFi = 2
# GSM = 3
NETWORK = 1
######################################
# target
@ -54,6 +58,7 @@ User/Src/sha256.c \
User/Src/show.c \
User/Src/utils.c \
User/Src/wizHelper.c \
User/Src/networkAbstractionLayer.c \
hottislib/PontCoopScheduler.c \
Core/Src/main.c \
Core/Src/gpio.c \
@ -153,7 +158,7 @@ C_INCLUDES = \
# compile gcc flags
ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -Werror -fdata-sections -ffunction-sections
CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -DNETWORK="\"$(NETWORK)\"" -Wall -Werror -fdata-sections -ffunction-sections
CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -DNETWORK=$(NETWORK) -Wall -Werror -fdata-sections -ffunction-sections
ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2

View File

@ -0,0 +1,9 @@
#ifndef _NETWORK_ABSTRACTION_LAYER_H_
#define _NETWORK_ABSTRACTION_LAYER_H_
void networkInit();
#endif /* _NETWORK_ABSTRACTION_LAYER_H_ */

View File

@ -13,11 +13,14 @@
#include <show.h>
#include <logger.h>
#include <eeprom.h>
#include <wizHelper.h>
#include <networkAbstractionLayer.h>
#include <config.h>
#include <counter.h>
void my_setup_1() {
schInit();
logInit();
@ -37,7 +40,7 @@ void my_setup_2() {
configInit();
wizInit();
networkInit();
counterInit();

View File

@ -0,0 +1,8 @@
#include <networkAbstractionLayer.h>
#include <wizHelper.h>
void networkInit() {
wizInit();
}