-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c36bdad
commit 5b3bf25
Showing
4 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (C) 2023-2024 Dmitry Ponomarev <[email protected]> | ||
# Distributed under the terms of the GPL v3 license, available in the file LICENSE. | ||
|
||
# Include guard | ||
if(PERIPHERAL_SPI_CMAKE) | ||
return() | ||
endif() | ||
set(PERIPHERAL_SPI_CMAKE ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
if(NOT APP_PLATFORM) | ||
message(SEND_ERROR "APP_PLATFORM is not specified or unsupported! Options: stm32f103, stm32g0b1, ubuntu.") | ||
endif() | ||
|
||
if(APP_PLATFORM STREQUAL "stm32f103" OR APP_PLATFORM STREQUAL "stm32g0b1") | ||
list(APPEND PERIPHERAL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/spi_stm32.cpp) | ||
elseif(APP_PLATFORM STREQUAL "ubuntu") | ||
list(APPEND PERIPHERAL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/spi_ubuntu.cpp) | ||
else() | ||
message(SEND_ERROR "APP_PLATFORM is unknown.") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters