add network abstraction layer
This commit is contained in:
parent
e9b60d4058
commit
bfbcc309df
@ -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
|
||||
|
9
cube/User/Inc/networkAbstractionLayer.h
Normal file
9
cube/User/Inc/networkAbstractionLayer.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef _NETWORK_ABSTRACTION_LAYER_H_
|
||||
#define _NETWORK_ABSTRACTION_LAYER_H_
|
||||
|
||||
|
||||
|
||||
void networkInit();
|
||||
|
||||
|
||||
#endif /* _NETWORK_ABSTRACTION_LAYER_H_ */
|
@ -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();
|
||||
|
||||
|
8
cube/User/Src/networkAbstractionLayer.c
Normal file
8
cube/User/Src/networkAbstractionLayer.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include <networkAbstractionLayer.h>
|
||||
|
||||
#include <wizHelper.h>
|
||||
|
||||
|
||||
void networkInit() {
|
||||
wizInit();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user