diff options
author | Harsh Sharma <harsh.sharma@multitech.com> | 2020-01-24 15:12:18 -0600 |
---|---|---|
committer | Harsh Sharma <harsh.sharma@multitech.com> | 2020-01-24 15:12:18 -0600 |
commit | a9459f3548725e50b6d22ad04074fe2610be8808 (patch) | |
tree | 669409d5490a6267bc6384fbefe03db77bd5b482 | |
parent | d14d5e0766f7190cd3f6d91003e8d3f356f91359 (diff) | |
download | lora_gateway_mtac_full-a9459f3548725e50b6d22ad04074fe2610be8808.tar.gz lora_gateway_mtac_full-a9459f3548725e50b6d22ad04074fe2610be8808.tar.bz2 lora_gateway_mtac_full-a9459f3548725e50b6d22ad04074fe2610be8808.zip |
Added spi_device option to util_pkt_logger
-rw-r--r-- | util_pkt_logger/src/util_pkt_logger.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util_pkt_logger/src/util_pkt_logger.c b/util_pkt_logger/src/util_pkt_logger.c index 38a50f7..638fde2 100644 --- a/util_pkt_logger/src/util_pkt_logger.c +++ b/util_pkt_logger/src/util_pkt_logger.c @@ -36,6 +36,7 @@ Maintainer: Sylvain Miermont #include "parson.h" #include "loragw_hal.h" +#include "loragw_spi.h" /* -------------------------------------------------------------------------- */ /* --- PRIVATE MACROS ------------------------------------------------------- */ @@ -336,6 +337,14 @@ int parse_gateway_configuration(const char * conf_file) { MSG("INFO: gateway MAC address is configured to %016llX\n", ull); } + str = json_object_get_string(conf, "spi_device"); + if (str != NULL) { + MSG("INFO: SPI device is configured to \"%s\"\n", str); + lgw_spi_set_path(str); + } else { + MSG("INFO: SPI device is not valid\"%s\"\n", str); + } + json_value_free(root_val); return 0; } |