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.

40 lines
1.4 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. --- a/libloragw/CMakeLists.txt
  10. +++ b/libloragw/CMakeLists.txt
  11. @@ -13,6 +13,9 @@ option(DEBUG_GPIO "Active debug mode in
  12. option(DEBUG_LBT "Active debug mode in LBT module" OFF)
  13. option(DEBUG_GPS "Active debug mode in GPS module" OFF)
  14. +set(SPI_DEV_PATH "/dev/spidev0.0" CACHE FILEPATH "Path of spi-dev")
  15. +set(SPI_SPEED 8000000 CACHE STRING "SPI clock frequency")
  16. +
  17. message("-- Build with debug AUX: ${DEBUG_AUX}")
  18. message("-- Build with debug SPI: ${DEBUG_SPI}")
  19. message("-- Build with debug REG: ${DEBUG_REG}")
  20. @@ -20,6 +23,8 @@ message("-- Build with debug HAL: ${DEBU
  21. message("-- Build with debug GPIO: ${DEBUG_GPIO}")
  22. message("-- Build with debug LBT: ${DEBUG_LBT}")
  23. message("-- Build with debug GPS: ${DEBUG_GPS}")
  24. +message("-- Build with SPI_DEV_PATH: ${SPI_DEV_PATH}")
  25. +message("-- Build with SPI_SPEED: ${SPI_SPEED}")
  26. # -- add the compile options
  27. target_compile_options(
  28. @@ -28,6 +33,8 @@ target_compile_options(
  29. -Werror
  30. -Wall
  31. -Wextra
  32. + -DSPI_DEV_PATH="${SPI_DEV_PATH}"
  33. + -DSPI_SPEED=${SPI_SPEED}
  34. )
  35. target_sources(${TARGET}