Fix RFM95 driver (RPi) (#800)

This commit is contained in:
Olivier
2017-03-26 11:30:54 +02:00
committed by Embedded Innovation
parent cde5d8f7c3
commit 63b8d935c8
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -55,7 +55,7 @@ LOCAL uint8_t RFM95_spiMultiByteTransfer(const uint8_t cmd, uint8_t* buf, uint8_
*ptx++ = cmd;
while (len--) {
if (aReadMode) {
*ptx++ = RF24_NOP;
*ptx++ = (uint8_t)RFM95_NOP;
} else {
*ptx++ = *current++;
}
@@ -78,7 +78,7 @@ LOCAL uint8_t RFM95_spiMultiByteTransfer(const uint8_t cmd, uint8_t* buf, uint8_
status = _SPI.transfer(cmd);
while (len--) {
if (aReadMode) {
status = _SPI.transfer((uint8_t)0x00);
status = _SPI.transfer((uint8_t)RFM95_NOP);
if (buf != NULL) {
*current++ = status;
}
+1
View File
@@ -33,6 +33,7 @@
// Register access
#define RFM95_READ_REGISTER (0x7Fu) //!< reading register
#define RFM95_WRITE_REGISTER (0x80u) //!< writing register
#define RFM95_NOP (0x00u) //!< NOP
// Registers, available in LoRa mode
#define RFM95_REG_00_FIFO 0x00 //!< REG_00_FIFO