0
0
mirror of https://github.com/openwrt/packages.git synced 2025-02-07 08:09:51 +00:00
packages/net/lora-gateway-hal/patches/0003-add-SPI_DEV_PATH-and-SPI_SPEED-to-cmake.patch
Ilya Lipnitskiy 5d8d4fbbcb treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

41 lines
1.4 KiB
Diff

From 81cd227c04ccb615cffaaa7b6372affb7964df2e Mon Sep 17 00:00:00 2001
From: Xue Liu <liuxuenetmail@gmail.com>
Date: Sun, 24 Feb 2019 01:04:29 +0100
Subject: [PATCH 3/3] - add SPI_DEV_PATH and SPI_SPEED to cmake
Signed-off-by: Xue Liu <liuxuenetmail@gmail.com>
---
libloragw/CMakeLists.txt | 7 +++++++
1 file changed, 7 insertions(+)
--- a/libloragw/CMakeLists.txt
+++ b/libloragw/CMakeLists.txt
@@ -13,6 +13,9 @@ option(DEBUG_GPIO "Active debug mode in
option(DEBUG_LBT "Active debug mode in LBT module" OFF)
option(DEBUG_GPS "Active debug mode in GPS module" OFF)
+set(SPI_DEV_PATH "/dev/spidev0.0" CACHE FILEPATH "Path of spi-dev")
+set(SPI_SPEED 8000000 CACHE STRING "SPI clock frequency")
+
message("-- Build with debug AUX: ${DEBUG_AUX}")
message("-- Build with debug SPI: ${DEBUG_SPI}")
message("-- Build with debug REG: ${DEBUG_REG}")
@@ -20,6 +23,8 @@ message("-- Build with debug HAL: ${DEBU
message("-- Build with debug GPIO: ${DEBUG_GPIO}")
message("-- Build with debug LBT: ${DEBUG_LBT}")
message("-- Build with debug GPS: ${DEBUG_GPS}")
+message("-- Build with SPI_DEV_PATH: ${SPI_DEV_PATH}")
+message("-- Build with SPI_SPEED: ${SPI_SPEED}")
# -- add the compile options
target_compile_options(
@@ -28,6 +33,8 @@ target_compile_options(
-Werror
-Wall
-Wextra
+ -DSPI_DEV_PATH="${SPI_DEV_PATH}"
+ -DSPI_SPEED=${SPI_SPEED}
)
target_sources(${TARGET}