reorganize project structure
This commit is contained in:
@@ -5,7 +5,11 @@ set(PROJECT_MAIN_COMPONENT ${CMAKE_CURRENT_LIST_DIR}/src)
|
||||
|
||||
set(EXTRA_COMPONENT_DIRS
|
||||
${CMAKE_CURRENT_LIST_DIR}/config
|
||||
${CMAKE_CURRENT_LIST_DIR}/src
|
||||
${CMAKE_CURRENT_LIST_DIR}/src/drivers
|
||||
${CMAKE_CURRENT_LIST_DIR}/src/main
|
||||
${CMAKE_CURRENT_LIST_DIR}/src/tasks
|
||||
${CMAKE_CURRENT_LIST_DIR}/src/ssd
|
||||
${CMAKE_CURRENT_LIST_DIR}/src/wsled
|
||||
)
|
||||
|
||||
# For the esp-idf configuration
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
file(GLOB SRC_FILES
|
||||
"*.c"
|
||||
"*.cpp"
|
||||
"drivers/*.c"
|
||||
)
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SRC_FILES}
|
||||
PRIV_REQUIRES spi_flash
|
||||
REQUIRES esp_driver_gpio
|
||||
REQUIRES esp_driver_spi
|
||||
REQUIRES esp_driver_gpio esp_driver_spi
|
||||
INCLUDE_DIRS "."
|
||||
)
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "esp_log.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#include "pins.hpp"
|
||||
#include "shared/pins.h"
|
||||
|
||||
#include "DemoTask.hpp"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include<stdint.h>
|
||||
|
||||
// This class is for managing tasks
|
||||
class App {
|
||||
|
||||
public:
|
||||
@@ -14,8 +15,6 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
uint32_t ledState = 0;
|
||||
uint32_t blinkTime = 250;
|
||||
const char *TAG = "app"; // TODO: instead of this for logging you can use __FILE__ or __func__
|
||||
|
||||
};
|
||||
10
src/main/CMakeLists.txt
Normal file
10
src/main/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
file(GLOB SRC_FILES
|
||||
"*.c"
|
||||
"*.cpp"
|
||||
)
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SRC_FILES}
|
||||
INCLUDE_DIRS "." ".."
|
||||
)
|
||||
12
src/ssd/CMakeLists.txt
Normal file
12
src/ssd/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
file(GLOB SRC_FILES
|
||||
"*.c"
|
||||
"*.cpp"
|
||||
)
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SRC_FILES}
|
||||
PRIV_REQUIRES spi_flash
|
||||
REQUIRES esp_driver_gpio esp_driver_spi
|
||||
INCLUDE_DIRS "." ".."
|
||||
)
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "stdint.h"
|
||||
|
||||
#include "drivers/ssd.h"
|
||||
#include "common.h"
|
||||
#include "shared/common.h"
|
||||
|
||||
class SsdInterface {
|
||||
|
||||
12
src/tasks/CMakeLists.txt
Normal file
12
src/tasks/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
file(GLOB SRC_FILES
|
||||
"*.c"
|
||||
"*.cpp"
|
||||
)
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SRC_FILES}
|
||||
PRIV_REQUIRES spi_flash
|
||||
REQUIRES esp_driver_gpio esp_driver_spi
|
||||
INCLUDE_DIRS "." ".."
|
||||
)
|
||||
@@ -1,14 +1,11 @@
|
||||
|
||||
#include "DemoTask.hpp"
|
||||
|
||||
#include "driver/gpio.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
#include "SsdInterface.hpp"
|
||||
#include "WsledInterface.hpp"
|
||||
#include "pins.hpp"
|
||||
#include "ssd/SsdInterface.hpp"
|
||||
#include "wsled/WsledInterface.hpp"
|
||||
#include "shared/pins.h"
|
||||
|
||||
DemoTask::DemoTask() {
|
||||
|
||||
12
src/wsled/CMakeLists.txt
Normal file
12
src/wsled/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
file(GLOB SRC_FILES
|
||||
"*.c"
|
||||
"*.cpp"
|
||||
)
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SRC_FILES}
|
||||
PRIV_REQUIRES spi_flash
|
||||
REQUIRES esp_driver_gpio esp_driver_spi
|
||||
INCLUDE_DIRS "." ".."
|
||||
)
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "stdint.h"
|
||||
|
||||
#include "drivers/wsled.h"
|
||||
#include "common.h"
|
||||
#include "shared/common.h"
|
||||
|
||||
class WsledInterface {
|
||||
|
||||
Reference in New Issue
Block a user