|
|
- From ea2a7752295ab734464c2877e1f484a9bf08d58d Mon Sep 17 00:00:00 2001
- From: Xue Liu <liuxuenetmail@gmail.com>
- Date: Sun, 24 Feb 2019 01:03:48 +0100
- Subject: [PATCH 2/3] - add preprocessing for SPI_DEV_PATH and SPI_SPEED
-
- Signed-off-by: Xue Liu <liuxuenetmail@gmail.com>
- ---
- libloragw/src/loragw_spi.native.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
- diff --git a/libloragw/src/loragw_spi.native.c b/libloragw/src/loragw_spi.native.c
- index c01ed1c..fe251e3 100644
- --- a/libloragw/src/loragw_spi.native.c
- +++ b/libloragw/src/loragw_spi.native.c
- @@ -53,8 +53,15 @@ Maintainer: Sylvain Miermont
-
- #define READ_ACCESS 0x00
- #define WRITE_ACCESS 0x80
- -#define SPI_SPEED 8000000
- -#define SPI_DEV_PATH "/dev/spidev0.0"
- +
- +#ifndef SPI_SPEED
- +#error SPI_SPEED is not defined
- +#endif
- +
- +#ifndef SPI_DEV_PATH
- +#error SPI_DEV_PATH is not defined
- +#endif
- +
- //#define SPI_DEV_PATH "/dev/spidev32766.0"
-
- /* -------------------------------------------------------------------------- */
- --
- 2.20.1
-
|