From 0fc3e8fceb3adc4210c3c438b7bd177f0fa98284 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 17 Oct 2019 11:11:02 -0500 Subject: Add the MTCDT3 LoRa FPGA code --- configure.in | 2 +- src/mts-fpga-loader.sh | 3 ++- src/mts_fpga_reg.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 2309648..d0fc7d4 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT([src/eeprom_main.c]) -AM_INIT_AUTOMAKE([mts-id-eeprom], [0.4.1]) +AM_INIT_AUTOMAKE([mts-id-eeprom], [0.4.2]) AM_CONFIG_HEADER([config.h]) AC_PROG_CC diff --git a/src/mts-fpga-loader.sh b/src/mts-fpga-loader.sh index 027ff09..1688f2c 100644 --- a/src/mts-fpga-loader.sh +++ b/src/mts-fpga-loader.sh @@ -1,12 +1,13 @@ #!/bin/bash lora_1_5_h_hw="-LORA-1.5\$" +lora_1_5_lga_hw="MTCDT3" lora_2_1_hw="-LORA-2.1\$" L15=/sbin/mts-fpga-loader-1_5 L21=/sbin/sem-fpga-loader lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null) -if [[ $lora_hw =~ ${lora_1_5_h_hw} ]]; then +if [[ $lora_hw =~ ${lora_1_5_h_hw}|^${lora_1_5_lga_hw}* ]]; then if [[ -x ${L15} ]] ; then ${L15} "$@" else diff --git a/src/mts_fpga_reg.c b/src/mts_fpga_reg.c index 473868c..0c3a922 100644 --- a/src/mts_fpga_reg.c +++ b/src/mts_fpga_reg.c @@ -36,7 +36,7 @@ /* --- PRIVATE CONSTANTS ---------------------------------------------------- */ const char *valid_hw[] = {MTCDT, MTCAP}; -static const uint8_t fpga_version[] = {28, 31, 33}; +static const uint8_t fpga_version[] = {28, 31, 33, 35, 37}; static const struct mtac_reg_s loregs[3] = { {-1, 0, 0, 0, 2, 0, 0}, /* PAGE_REG */ {-1, 0, 7, 0, 1, 0, 0}, /* SOFT_RESET */ -- cgit v1.2.3