Skip to content

Commit

Permalink
Linux: Add rfm95 configure options (#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloaqno authored and fallberg committed Jun 16, 2018
1 parent 88a0d70 commit b84cd6a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions MyConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@
* @def MY_RFM69_FREQUENCY
* @brief The frequency to use.
*
* - RFM69_315MHZ
* - RFM69_433MHZ
* - RFM69_868MHZ
* - RFM69_915MHZ
Expand Down
27 changes: 26 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ MySensors options:
Enables RFM69 encryption.
All nodes and gateway must have this enabled, and all must be
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.
All nodes and gateway must have this enabled, and all must be
personalized with the same AES key.
Expand Down Expand Up @@ -454,6 +458,27 @@ for opt do
encryption=true
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*)
encryption=true
CPPFLAGS="-DMY_RFM95_ENABLE_ENCRYPTION $CPPFLAGS"
Expand Down

0 comments on commit b84cd6a

Please sign in to comment.