summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-gateway/lora-gateway-add-spi-path-function.patch
diff options
context:
space:
mode:
authorAndrii Pientsov <andrii.pientsov@globallogic.com>2020-05-27 15:05:10 +0300
committerAndrii Pientsov <andrii.pientsov@globallogic.com>2020-05-27 15:05:10 +0300
commite919ef1e33c2cb56856cdbd22792a3bc3f36341d (patch)
treeeb08d052d64d0814ea1cfc75664b64be68eaffbb /recipes-connectivity/lora/lora-gateway/lora-gateway-add-spi-path-function.patch
parente0d7185cbf41d7921acdb90bcac898f5e9786848 (diff)
downloadmeta-mlinux-atmel-e919ef1e33c2cb56856cdbd22792a3bc3f36341d.tar.gz
meta-mlinux-atmel-e919ef1e33c2cb56856cdbd22792a3bc3f36341d.tar.bz2
meta-mlinux-atmel-e919ef1e33c2cb56856cdbd22792a3bc3f36341d.zip
Remove duplicate LoRa
Diffstat (limited to 'recipes-connectivity/lora/lora-gateway/lora-gateway-add-spi-path-function.patch')
-rw-r--r--recipes-connectivity/lora/lora-gateway/lora-gateway-add-spi-path-function.patch57
1 files changed, 0 insertions, 57 deletions
diff --git a/recipes-connectivity/lora/lora-gateway/lora-gateway-add-spi-path-function.patch b/recipes-connectivity/lora/lora-gateway/lora-gateway-add-spi-path-function.patch
deleted file mode 100644
index fa5e68c..0000000
--- a/recipes-connectivity/lora/lora-gateway/lora-gateway-add-spi-path-function.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff --git a/libloragw/inc/loragw_spi.h b/libloragw/inc/loragw_spi.h
-index fef1f48..74ef251 100644
---- a/libloragw/inc/loragw_spi.h
-+++ b/libloragw/inc/loragw_spi.h
-@@ -46,6 +46,14 @@ Maintainer: Sylvain Miermont
- /* -------------------------------------------------------------------------- */
- /* --- PUBLIC FUNCTIONS PROTOTYPES ------------------------------------------ */
-
-+/* set SPI device */
-+/**
-+@brief LoRa concentrator SPI path configuration for spidev
-+@param path pointer to spidev device
-+@return LGW_SPI_SUCCESS if path is valid, LGW_SPI_ERROR if not
-+*/
-+int lgw_spi_set_path(const char *path);
-+
- /**
- @brief LoRa concentrator SPI setup (configure I/O and peripherals)
- @param spi_target_ptr pointer on a generic pointer to SPI target (implementation dependant)
-diff --git a/libloragw/src/loragw_spi.native.c b/libloragw/src/loragw_spi.native.c
-index c01ed1c..3472133 100644
---- a/libloragw/src/loragw_spi.native.c
-+++ b/libloragw/src/loragw_spi.native.c
-@@ -56,10 +56,24 @@ Maintainer: Sylvain Miermont
- #define SPI_SPEED 8000000
- #define SPI_DEV_PATH "/dev/spidev0.0"
- //#define SPI_DEV_PATH "/dev/spidev32766.0"
-+char* spi_dev_path = SPI_DEV_PATH;
-
- /* -------------------------------------------------------------------------- */
- /* --- PUBLIC FUNCTIONS DEFINITION ------------------------------------------ */
-
-+/* set SPI device */
-+int lgw_spi_set_path(const char *path) {
-+ if (path) {
-+ spi_dev_path = path;
-+ return LGW_SPI_SUCCESS;
-+ }
-+ else {
-+ return LGW_SPI_ERROR;
-+ }
-+}
-+
-+
-+
- /* SPI initialization and configuration */
- int lgw_spi_open(void **spi_target_ptr) {
- int *spi_device = NULL;
-@@ -78,7 +92,7 @@ int lgw_spi_open(void **spi_target_ptr) {
- }
-
- /* open SPI device */
-- dev = open(SPI_DEV_PATH, O_RDWR);
-+ dev = open(spi_dev_path, O_RDWR);
- if (dev < 0) {
- DEBUG_PRINTF("ERROR: failed to open SPI device %s\n", SPI_DEV_PATH);
- return LGW_SPI_ERROR;