Interplan IM920 library, 920MHz module
Dependents: IM920_sample IM920_SDlog IM920_sample IM920_sample3 ... more
IM920 ライブラリ
データモード、低速、長距離 の設定で通信するライブラリです。
920MHz無線モジュール
- mbedとモジュールとは、シリアル(TX,RX)、BUSY、RESET端子を接続します。
- モジュールはあらかじめ、コマンドでノード番号などを設定しておきます。
Diff: IM920_hal.cpp
- Revision:
- 3:db269462ad1c
- Parent:
- 0:d3ab05ed8142
--- a/IM920_hal.cpp Mon Jan 05 03:47:08 2015 +0000 +++ b/IM920_hal.cpp Thu Jan 08 13:25:46 2015 +0000 @@ -3,9 +3,11 @@ void IM920::setReset (bool flg) { if (_reset) { if (flg) { + _reset->output(); _reset->write(0); } else { - _reset->write(1); + _reset->input(); + _reset->mode(PullNone); } } } @@ -52,6 +54,6 @@ _busy = new DigitalIn(busy); } if (reset != NC) { - _reset = new DigitalOut(reset); + _reset = new DigitalInOut(reset); } }