You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.5 KiB

  1. From 81cd227c04ccb615cffaaa7b6372affb7964df2e Mon Sep 17 00:00:00 2001
  2. From: Xue Liu <liuxuenetmail@gmail.com>
  3. Date: Sun, 24 Feb 2019 01:04:29 +0100
  4. Subject: [PATCH 3/3] - add SPI_DEV_PATH and SPI_SPEED to cmake
  5. Signed-off-by: Xue Liu <liuxuenetmail@gmail.com>
  6. ---
  7. libloragw/CMakeLists.txt | 7 +++++++
  8. 1 file changed, 7 insertions(+)
  9. diff --git a/libloragw/CMakeLists.txt b/libloragw/CMakeLists.txt
  10. index b2102ae..32abf51 100644
  11. --- a/libloragw/CMakeLists.txt
  12. +++ b/libloragw/CMakeLists.txt
  13. @@ -13,6 +13,9 @@ option(DEBUG_GPIO "Active debug mode in GPIO module" OFF)
  14. option(DEBUG_LBT "Active debug mode in LBT module" OFF)
  15. option(DEBUG_GPS "Active debug mode in GPS module" OFF)
  16. +set(SPI_DEV_PATH "/dev/spidev0.0" CACHE FILEPATH "Path of spi-dev")
  17. +set(SPI_SPEED 8000000 CACHE STRING "SPI clock frequency")
  18. +
  19. message("-- Build with debug AUX: ${DEBUG_AUX}")
  20. message("-- Build with debug SPI: ${DEBUG_SPI}")
  21. message("-- Build with debug REG: ${DEBUG_REG}")
  22. @@ -20,6 +23,8 @@ message("-- Build with debug HAL: ${DEBUG_HAL}")
  23. message("-- Build with debug GPIO: ${DEBUG_GPIO}")
  24. message("-- Build with debug LBT: ${DEBUG_LBT}")
  25. message("-- Build with debug GPS: ${DEBUG_GPS}")
  26. +message("-- Build with SPI_DEV_PATH: ${SPI_DEV_PATH}")
  27. +message("-- Build with SPI_SPEED: ${SPI_SPEED}")
  28. # -- add the compile options
  29. target_compile_options(
  30. @@ -28,6 +33,8 @@ target_compile_options(
  31. -Werror
  32. -Wall
  33. -Wextra
  34. + -DSPI_DEV_PATH="${SPI_DEV_PATH}"
  35. + -DSPI_SPEED=${SPI_SPEED}
  36. )
  37. target_sources(${TARGET}
  38. --
  39. 2.20.1