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.

35 lines
1.0 KiB

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