Reworked file tree + added new header and source file for the NRF driver that i'll eventually write one day when I get to it ^^

This commit is contained in:
Th3maz1ng 2022-08-16 18:06:29 +02:00
parent d4c9ffd223
commit 14c3d41ac2
12 changed files with 48 additions and 11 deletions

View File

@ -6,7 +6,8 @@ GEN_IMAGES= $(TARGET).elf
GEN_BINS = $(TARGET).bin GEN_BINS = $(TARGET).bin
SUBDIRS = \ SUBDIRS = \
$(TOP_DIR)/app \ $(TOP_DIR)/app \
$(TOP_DIR)/app/third_party/nano-shell-master $(TOP_DIR)/app/third_party/nano-shell-master \
$(TOP_DIR)/app/third_party/driver/NRF24L01P
endif # } PDIR endif # } PDIR
ifndef PDIR # { ifndef PDIR # {
@ -31,7 +32,8 @@ endif
COMPONENTS_$(TARGET) = \ COMPONENTS_$(TARGET) = \
$(TOP_DIR)/app/libuser$(LIB_EXT) \ $(TOP_DIR)/app/libuser$(LIB_EXT) \
$(TOP_DIR)/app/third_party/nano-shell-master/libnanoshell$(LIB_EXT) $(TOP_DIR)/app/third_party/nano-shell-master/libnanoshell$(LIB_EXT) \
$(TOP_DIR)/app/third_party/driver/libnrf24l01p$(LIB_EXT)
ifeq ($(USE_LIB), 0) ifeq ($(USE_LIB), 0)
COMPONENTS_$(TARGET) += \ COMPONENTS_$(TARGET) += \

View File

@ -1 +0,0 @@
#define NEW_LINE "\r\n"

View File

@ -16,16 +16,16 @@
#include "wm_include.h" #include "wm_include.h"
#include "wm_gpio_afsel.h" #include "wm_gpio_afsel.h"
#include "nano_shell.h" #include "nano_shell.h"
#include "nano_shell_interface.h"
#include "lwip/netif.h" #include "lwip/netif.h"
#include "FreeRTOS.h" #include "FreeRTOS.h"
#include "FreeRTOSConfig.h" #include "FreeRTOSConfig.h"
#include "common.h" #include "app_common.h"
tls_os_task_t nano_shell_task_handle = NULL; tls_os_task_t nano_shell_task_handle = NULL;
tls_os_task_t nano_shell_server_task_handle = NULL; tls_os_task_t nano_shell_server_task_handle = NULL;
extern s16 uart0_rx_callback(u16 len, void *user_data); extern s16 uart0_rx_callback(u16 len, void *user_data);
extern s16 uart1_rx_callback(u16 len, void *user_data); extern s16 uart1_rx_callback(u16 len, void *user_data);
extern int shell_printf(const char *format, ...);
#define NANO_SHELL_TASK_STK_SIZE 640 #define NANO_SHELL_TASK_STK_SIZE 640
#define NANO_SHELL_SERVER_TASK_STK_SIZE 640 #define NANO_SHELL_SERVER_TASK_STK_SIZE 640

View File

@ -6,10 +6,10 @@
#include "FreeRTOS.h" #include "FreeRTOS.h"
#include "task.h" #include "task.h"
#include "lwip/netif.h" #include "lwip/netif.h"
#include "common.h" #include "app_common.h"
#include "nano_shell_interface.h"
#include "wm_gpio_afsel.h" #include "wm_gpio_afsel.h"
extern int shell_printf(const char *format, ...);
extern int wm_printf(const char *fmt,...); extern int wm_printf(const char *fmt,...);
extern u32 tls_mem_get_avail_heapsize(void); extern u32 tls_mem_get_avail_heapsize(void);
extern bool disconnect_client(void); extern bool disconnect_client(void);

View File

@ -93,8 +93,6 @@ void shell_putc(char ch)
(void)shell_printf("%c", ch); (void)shell_printf("%c", ch);
} }
bool got_linefeed = false;
void low_level_write_char(char ch) void low_level_write_char(char ch)
{ {
(void)sendchar((int)ch); (void)sendchar((int)ch);

View File

@ -4,9 +4,9 @@
#include "FreeRTOS.h" #include "FreeRTOS.h"
#include "FreeRTOSConfig.h" #include "FreeRTOSConfig.h"
#include "nano_shell_server_task.h" #include "nano_shell_server_task.h"
#include "common.h" #include "nano_shell_interface.h"
#include "app_common.h"
extern int shell_printf(const char *format, ...);
extern void network_rx_callback(u16 len, char *data); extern void network_rx_callback(u16 len, char *data);
tls_os_mutex_t *socket_mutex = NULL; tls_os_mutex_t *socket_mutex = NULL;

View File

@ -0,0 +1,14 @@
TOP_DIR = ../../../..
sinclude $(TOP_DIR)/tools/w800/conf.mk
ifndef PDIR
GEN_LIBS = libnrf24l01p$(LIB_EXT)
endif
#DEFINES +=
sinclude $(TOP_DIR)/tools/w800/rules.mk
INCLUDES := $(INCLUDES) -I $(PDIR)include
PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile

View File

@ -0,0 +1,6 @@
#include "NRF24L01P.h"
bool NRF24L01_init(void)
{
return true;
}

View File

@ -0,0 +1,4 @@
#include "wm_include.h"
#include "app_common.h"
bool NRF24L01_init(void);

6
app_include/app_common.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef APP_COMMON_H
#define APP_COMMON_H
#define NEW_LINE "\r\n"
#endif //APP_COMMON_H

View File

@ -0,0 +1,6 @@
#ifndef NANO_SHELL_INTERFACE_H
#define NANO_SHELL_INTERFACE_H
extern int shell_printf(const char *format, ...);
#endif //NANO_SHELL_INTERFACE_H

View File

@ -42,7 +42,9 @@ INCLUDES += -I $(TOP_DIR)/src/network/lwip2.0.3/include
INCLUDES += -I $(TOP_DIR)/src/os/rtos/include INCLUDES += -I $(TOP_DIR)/src/os/rtos/include
INCLUDES += -I $(TOP_DIR)/src/app/factorycmd INCLUDES += -I $(TOP_DIR)/src/app/factorycmd
INCLUDES += -I $(TOP_DIR)/app_include
INCLUDES += -I $(TOP_DIR)/app/third_party/nano-shell-master INCLUDES += -I $(TOP_DIR)/app/third_party/nano-shell-master
INCLUDES += -I $(TOP_DIR)/app/third_party/driver/NRF24L01P
#nimble host #nimble host
INCLUDES += -I $(TOP_DIR)/src/bt/blehost/ext/tinycrypt/include INCLUDES += -I $(TOP_DIR)/src/bt/blehost/ext/tinycrypt/include
INCLUDES += -I $(TOP_DIR)/src/bt/blehost/nimble/host/include INCLUDES += -I $(TOP_DIR)/src/bt/blehost/nimble/host/include