Linux: Add rfm95 configure options (#1135)

This commit is contained in:
Marcelo Aquino
2018-06-16 19:19:32 +02:00
committed by Patrick Fallberg
parent 88a0d70e4d
commit b84cd6ac4e
2 changed files with 27 additions and 1 deletions
+1
View File
@@ -602,6 +602,7 @@
* @def MY_RFM69_FREQUENCY * @def MY_RFM69_FREQUENCY
* @brief The frequency to use. * @brief The frequency to use.
* *
* - RFM69_315MHZ
* - RFM69_433MHZ * - RFM69_433MHZ
* - RFM69_868MHZ * - RFM69_868MHZ
* - RFM69_915MHZ * - RFM69_915MHZ
Vendored
+26 -1
View File
@@ -85,7 +85,11 @@ MySensors options:
Enables RFM69 encryption. Enables RFM69 encryption.
All nodes and gateway must have this enabled, and all must be All nodes and gateway must have this enabled, and all must be
personalized with the same AES key. personalized with the same AES key.
--my-rfm95-encryption-enabled --my-rfm95-frequency=[169|315|434|868|915]
RFM95 Module Frequency. [868]
--my-rfm95-irq-pin=<PIN> Pin number connected to RFM95 IRQ pin.
--my-rfm95-cs-pin=<PIN> Pin number to use for RFM95 Chip-Select.
--my-rfm95-encryption-enabled
Enables RFM95 encryption. Enables RFM95 encryption.
All nodes and gateway must have this enabled, and all must be All nodes and gateway must have this enabled, and all must be
personalized with the same AES key. personalized with the same AES key.
@@ -454,6 +458,27 @@ for opt do
encryption=true encryption=true
CPPFLAGS="-DMY_RFM69_ENABLE_ENCRYPTION $CPPFLAGS" CPPFLAGS="-DMY_RFM69_ENABLE_ENCRYPTION $CPPFLAGS"
;; ;;
--my-rfm95-frequency=*)
if [[ ${optarg} == "169" ]]; then
CPPFLAGS="-DMY_RFM95_FREQUENCY=RFM95_169MHZ $CPPFLAGS"
elif [[ ${optarg} == "315" ]]; then
CPPFLAGS="-DMY_RFM95_FREQUENCY=RFM95_315MHZ $CPPFLAGS"
elif [[ ${optarg} == "434" ]]; then
CPPFLAGS="-DMY_RFM95_FREQUENCY=RFM95_434MHZ $CPPFLAGS"
elif [[ ${optarg} == "868" ]]; then
CPPFLAGS="-DMY_RFM95_FREQUENCY=RFM95_868MHZ $CPPFLAGS"
elif [[ ${optarg} == "915" ]]; then
CPPFLAGS="-DMY_RFM95_FREQUENCY=RFM95_915MHZ $CPPFLAGS"
else
echo "[WARNING] Illegal value for --my-rfm95-frequency=${optarg}, ignored"
fi
;;
--my-rfm95-irq-pin=*)
CPPFLAGS="-DMY_RFM95_IRQ_NUM=${optarg} $CPPFLAGS"
;;
--my-rfm95-cs-pin=*)
CPPFLAGS="-DMY_RFM95_CS_PIN=${optarg} $CPPFLAGS"
;;
--my-rfm95-encryption-enabled*) --my-rfm95-encryption-enabled*)
encryption=true encryption=true
CPPFLAGS="-DMY_RFM95_ENABLE_ENCRYPTION $CPPFLAGS" CPPFLAGS="-DMY_RFM95_ENABLE_ENCRYPTION $CPPFLAGS"