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
Revision 9:4002a2c117cc, committed 2013-09-02
- Comitter:
- charly
- Date:
- Mon Sep 02 20:32:54 2013 +0000
- Parent:
- 8:d9e2ca137f2e
- Commit message:
- removed DEBUG-LEDs LED1 .. LED4 as they make problems on other platforms (KL25Z)
Changed in this revision
| RF22.cpp | Show annotated file Show diff for this revision Revisions of this file |
| RF22.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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
--- a/RF22.h Sun Apr 07 11:42:36 2013 +0000
+++ b/RF22.h Mon Sep 02 20:32:54 2013 +0000
@@ -1132,10 +1132,10 @@
InterruptIn _interrupt;
uint8_t _deviceType;
- DigitalOut led1;
- DigitalOut led2;
- DigitalOut led3;
- DigitalOut led4;
+ //DigitalOut led1;
+ //DigitalOut led2;
+ //DigitalOut led3;
+ //DigitalOut led4;
// These volatile members may get changed in the interrupt service routine
volatile uint8_t _bufLen;