From 7e777c575af6279fcc44e147cd00fa002c53bab0 Mon Sep 17 00:00:00 2001 From: kerem Date: Sat, 14 Jan 2023 17:03:49 +0100 Subject: [PATCH] Transporting functions for peripherals --- CMakeLists.txt | 17 +++++++++++++++++ periferals/CMakeLists.txt | 10 +--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e52af8c..8053002 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,23 @@ add_subdirectory(csl) add_subdirectory(drivers) add_subdirectory(periferals) + + + +addPeripheral("deviceSetup") # TODO: this point needs to be discussed. How should it work and what should it do? +addPeripheral("timer") +addPeripheral("usart") +addPeripheral("spi") +addPeripheral("i2c") +addPeripheral("delay") +addPeripheral("pin") + + + + + + + message("${BoldBlue}Project Info ${ColourReset}") message("${Blue} |--> Exec Name \t: ${EXECUTABLE} ${ColourReset}") message("${Blue} |--> Compiler Def\t: ${COMPILER_DEFS} ${ColourReset}") diff --git a/periferals/CMakeLists.txt b/periferals/CMakeLists.txt index c11be83..3a4d2e3 100644 --- a/periferals/CMakeLists.txt +++ b/periferals/CMakeLists.txt @@ -3,7 +3,7 @@ function(addPeripheral alias) message("Chip has usart >>imp_${alias}.c was found<<") if(EXISTS ${PERIFERALS_DIR}/${alias}.c) # Cheks if generic funtions are awailable. this is useful for standars as SPI i2c etc... message("${alias}.c generic functions library extits") - add_library(${alias}_submodule ${alias}.c ${CSL_SOURCES}/imp_${alias}.c) + add_library(${alias}_submodule ${PERIFERALS_DIR}/${alias}.c ${CSL_SOURCES}/imp_${alias}.c) else() add_library(${alias}_submodule ${CSL_SOURCES}/imp_${alias}.c) endif() @@ -18,11 +18,3 @@ function(addPeripheral alias) message("${BoldRed}Compilation Aborted") endif() endfunction() - -addPeripheral("deviceSetup") # TODO: this point needs to be discussed. How should it work and what should it do? -addPeripheral("timer") -addPeripheral("usart") -addPeripheral("spi") -addPeripheral("i2c") -addPeripheral("delay") -addPeripheral("pin")