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.

30 lines
906 B

  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. --- a/libloragw/src/loragw_spi.native.c
  10. +++ b/libloragw/src/loragw_spi.native.c
  11. @@ -53,8 +53,15 @@ Maintainer: Sylvain Miermont
  12. #define READ_ACCESS 0x00
  13. #define WRITE_ACCESS 0x80
  14. -#define SPI_SPEED 8000000
  15. -#define SPI_DEV_PATH "/dev/spidev0.0"
  16. +
  17. +#ifndef SPI_SPEED
  18. +#error SPI_SPEED is not defined
  19. +#endif
  20. +
  21. +#ifndef SPI_DEV_PATH
  22. +#error SPI_DEV_PATH is not defined
  23. +#endif
  24. +
  25. //#define SPI_DEV_PATH "/dev/spidev32766.0"
  26. /* -------------------------------------------------------------------------- */