Library for HopeRF RFM22 / RFM22B transceiver module ported to mbed. Original Software from Mike McCauley (mikem@open.com.au) . See http://www.open.com.au/mikem/arduino/RF22/
Dependents: RF22_MAX_test_Send Geofence_receiver Geofence_sender Geofence_sender ... more
More Info about RFM22-modules like connecting and a demo-program see RF22-Notebook
Diff: RF22.cpp
- Revision:
- 9:4002a2c117cc
- Parent:
- 8:d9e2ca137f2e
--- a/RF22.cpp Sun Apr 07 11:42:36 2013 +0000 +++ b/RF22.cpp Mon Sep 02 20:32:54 2013 +0000 @@ -58,7 +58,7 @@ }; RF22::RF22(PinName slaveSelectPin, PinName mosi, PinName miso, PinName sclk, PinName interrupt) - : _slaveSelectPin(slaveSelectPin), _spi(mosi, miso, sclk), _interrupt(interrupt), led1(LED1), led2(LED2), led3(LED3), led4(LED4) + : _slaveSelectPin(slaveSelectPin), _spi(mosi, miso, sclk), _interrupt(interrupt) /*, led1(LED1), led2(LED2), led3(LED3), led4(LED4) */ { @@ -193,7 +193,7 @@ { uint8_t _lastInterruptFlags[2]; - led1 = 1; + //led1 = 1; // Read the interrupt flags which clears the interrupt spiBurstRead(RF22_REG_03_INTERRUPT_STATUS1, _lastInterruptFlags, 2); @@ -220,7 +220,7 @@ if (_lastInterruptFlags[0] & RF22_IFFERROR) { // Serial.println("IFFERROR"); - led4 = !led4; + //led4 = !led4; resetFifos(); // Clears the interrupt if (_mode == RF22_MODE_TX) restartTransmit(); @@ -285,7 +285,7 @@ if ( len > RF22_MAX_MESSAGE_LEN || len < _bufLen) { _rxBad++; - led2 = !led2; + //led2 = !led2; _mode = RF22_MODE_IDLE; clearRxBuf(); return; // Hmmm receiver buffer overflow. @@ -301,14 +301,14 @@ //resetRxFifo(); //__enable_irq(); // Enable Interrupts - led3 = !led3; + //led3 = !led3; } if (_lastInterruptFlags[0] & RF22_ICRCERROR) { // Serial.println("ICRCERR"); _rxBad++; - led2 = !led2; + //led2 = !led2; clearRxBuf(); resetRxFifo(); _mode = RF22_MODE_IDLE; @@ -326,7 +326,7 @@ } - led1 = 0; + //led1 = 0; } // These are low level functions that call the interrupt handler for the correct