init skeleton commit

This commit is contained in:
Morgan Allen 2018-09-02 17:10:41 -07:00
commit 6fbe6e4ac4
4 changed files with 63 additions and 0 deletions

16
Kconfig Normal file
View file

@ -0,0 +1,16 @@
menuconfig WIFI_MANAGER_ENABLED
bool "WIFI_MANAGER"
default y
help
Select this option to enable WIFI_MANAGER driver and show the submodule with configuration
config WIFI_MANAGER_MEM_ADDR
hex "Memory location to store AP info in flash"
depends on WIFI_MANAGER_ENABLED
default 0x04d000
help
Memory location to store WiFi AP info
config WIFI_MANAGER_MAX_AP
int "Maximum number of APs to store in flash"
default 8

7
Makefile.projbuild Normal file
View file

@ -0,0 +1,7 @@
WIFI_MAN_BUILD_DIR=$(abspath $(BUILD_DIR_BASE)/wifi-manager)
WIFI_MAN_CONFIG_BIN=$(WIFI_MAN_BUILD_DIR)/wifi-manager-config.bin
ESPTOOL_ALL_FLASH_ARGS += $(CONFIG_WIFI_MANAGER_MEM_ADDR) $(WIFI_MAN_CONFIG_BIN)
wifi-man-flash-config:
echo flaaaaash

9
component.mk Normal file
View file

@ -0,0 +1,9 @@
ifdef CONFIG_WIFI_MANAGER_ENABLED
COMPONENT_SRCDIRS := main
COMPONENT_ADD_INCLUDEDIRS := main include
COMPONENT_ADD_LDFLAGS := -lesp32-wifi-manager
COMPONENT_EXTRA_CLEAN :=
endif

31
main/esp32-wifi-manager.c Normal file
View file

@ -0,0 +1,31 @@
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "esp_heap_caps.h"
#include "driver/gpio.h"
#include "driver/spi_common.h"
#include "driver/spi_master.h"
typedef struct wifi_man_ap_info {
} wifi_man_ap_info_t;
static struct wifi_man_ap_store {
uint8_t count;
struct wifi_man_ap_info aps[CONFIG_WIFI_MANAGER_MAX_AP];
} wifi_man_ap_store;
void wifi_man_init_config() {
memset(&wifi_man_ap_store, 0, sizeof(struct wifi_man_ap_store));
}
int wifi_man_load_config() {
uint8_t count = 0;
return count;
};