Split driver-y things into a separate component

custom
jacqueline 2 years ago
parent b13a9793e1
commit 28d73ad866
  1. 13
      CMakeLists.txt
  2. 5
      main/CMakeLists.txt
  3. 5
      src/drivers/CMakeLists.txt
  4. 0
      src/drivers/battery.cpp
  5. 0
      src/drivers/dac.cpp
  6. 0
      src/drivers/display-init.cpp
  7. 0
      src/drivers/display.cpp
  8. 0
      src/drivers/gpio-expander.cpp
  9. 0
      src/drivers/i2c.cpp
  10. 0
      src/drivers/include/battery.hpp
  11. 0
      src/drivers/include/dac.hpp
  12. 0
      src/drivers/include/display-init.hpp
  13. 0
      src/drivers/include/display.hpp
  14. 0
      src/drivers/include/gpio-expander.hpp
  15. 0
      src/drivers/include/i2c.hpp
  16. 0
      src/drivers/include/playback.hpp
  17. 0
      src/drivers/include/storage.hpp
  18. 0
      src/drivers/playback.cpp
  19. 0
      src/drivers/storage.cpp
  20. 3
      src/main/CMakeLists.txt
  21. 0
      src/main/main.cpp

@ -1,16 +1,25 @@
# For more information about build system see # For more information about build system see
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html # https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.8)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
include($ENV{ADF_PATH}/CMakeLists.txt) include($ENV{ADF_PATH}/CMakeLists.txt)
# Build only the subset of components that we actually depend on.
set(COMPONENTS "")
# External dependencies
list(APPEND EXTRA_COMPONENT_DIRS "lib/result") list(APPEND EXTRA_COMPONENT_DIRS "lib/result")
list(APPEND EXTRA_COMPONENT_DIRS "lib/lvgl") list(APPEND EXTRA_COMPONENT_DIRS "lib/lvgl")
# Project components
list(APPEND EXTRA_COMPONENT_DIRS "src/")
include($ENV{IDF_PATH}/tools/cmake/project.cmake) include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(gay-ipod-fw) project(gay-ipod-fw)
# Extra build flags that should apply to the entire build. This should mostly
# just be used to setting flags that our external dependencies requires.
# Otherwise, prefer adding per-component build flags to keep things neat.
idf_build_set_property(COMPILE_OPTIONS "-DRESULT_DISABLE_EXCEPTIONS -DLV_CONF_INCLUDE_SIMPLE" APPEND) idf_build_set_property(COMPILE_OPTIONS "-DRESULT_DISABLE_EXCEPTIONS -DLV_CONF_INCLUDE_SIMPLE" APPEND)

@ -1,5 +0,0 @@
idf_component_register(
SRCS "gay-ipod-fw.cpp" "dac.cpp" "gpio-expander.cpp" "battery.cpp" "storage.cpp"
"i2c.cpp" "playback.cpp" "display.cpp" "display-init.cpp"
INCLUDE_DIRS "."
REQUIRES "esp_adc_cal" "fatfs" "audio_pipeline" "audio_stream" "result" "lvgl")

@ -0,0 +1,5 @@
idf_component_register(
SRCS "dac.cpp" "gpio-expander.cpp" "battery.cpp" "storage.cpp" "i2c.cpp"
"playback.cpp" "display.cpp" "display-init.cpp"
INCLUDE_DIRS "include"
REQUIRES "esp_adc_cal" "fatfs" "audio_pipeline" "audio_stream" "result" "lvgl")

@ -0,0 +1,3 @@
idf_component_register(
SRCS "main.cpp"
REQUIRES "drivers")
Loading…
Cancel
Save