Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: MRF24J40/MRF24J40.cpp
- Revision:
- 6:9daa56b8a027
- Parent:
- 0:6830fa3899e3
diff -r 85fea4ceaa1f -r 9daa56b8a027 MRF24J40/MRF24J40.cpp --- a/MRF24J40/MRF24J40.cpp Wed Nov 11 00:47:05 2015 +0000 +++ b/MRF24J40/MRF24J40.cpp Tue Nov 17 19:13:55 2015 +0000 @@ -165,16 +165,16 @@ WriteShort(TXNMTRIG, 0x01); } -uint8_t MRF24J40::Receive(uint8_t *data, uint8_t maxLength) +uint8_t MRF24J40::Receive(uint8_t *data, uint8_t maxLength, uint8_t *rssi) { uint8_t i, length; - uint8_t lqi, rssi; + uint8_t lqi; if(ReadShort(ISRSTS)& 0x08) { length = ReadLong(0x300); lqi = ReadLong(0x301 + length); - rssi = ReadLong(0x302 + length); + *rssi = ReadLong(0x302 + length); for(i=0; i<length; i++) if(i<maxLength) *data++ = ReadLong(0x301 + (uint16_t)i);