Skip to content

Commit 3830c5d

Browse files
authored
RFM69: Add missing SPI namespace (#987)
1 parent 809663e commit 3830c5d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/RFM69/new/RFM69_new.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ LOCAL void RFM69_interruptHandler(void)
279279
#ifdef LINUX_SPI_BCM
280280
char data[RFM69_MAX_PACKET_LEN + 1]; // max packet len + 1 byte for the command
281281
data[0] = RFM69_REG_FIFO & RFM69_READ_REGISTER;
282-
SPI.transfern(data, 3);
282+
RFM69_SPI.transfern(data, 3);
283283

284284
RFM69.currentPacket.header.packetLen = data[1];
285285
RFM69.currentPacket.header.recipient = data[2];
@@ -290,7 +290,7 @@ LOCAL void RFM69_interruptHandler(void)
290290

291291
data[0] = RFM69_REG_FIFO & RFM69_READ_REGISTER;
292292
//SPI.transfern(data, RFM69.currentPacket.header.packetLen - 1); //TODO: Wrong packetLen?
293-
SPI.transfern(data, RFM69.currentPacket.header.packetLen);
293+
RFM69_SPI.transfern(data, RFM69.currentPacket.header.packetLen);
294294

295295
//(void)memcpy((void*)&RFM69.currentPacket.data[2], (void*)&data[1], RFM69.currentPacket.header.packetLen - 2); //TODO: Wrong packetLen?
296296
(void)memcpy((void*)&RFM69.currentPacket.data[2], (void*)&data[1],
@@ -1107,18 +1107,18 @@ LOCAL void RFM69_listenModeSendBurst(const uint8_t recipient, uint8_t* data, con
11071107
// write to FIFO TODO refactorize with func, check if send/sendframe could be used, and prepare packet struct
11081108
RFM69_prepareSPITransaction();
11091109
RFM69_csn(LOW);
1110-
SPI.transfer(RFM69_REG_FIFO | 0x80);
1111-
SPI.transfer(len +
1112-
4); // two bytes for target and sender node, two bytes for the burst time remaining
1113-
SPI.transfer(recipient);
1114-
SPI.transfer(_address);
1110+
RFM69_SPI.transfer(RFM69_REG_FIFO | 0x80);
1111+
RFM69_SPI(len +
1112+
4); // two bytes for target and sender node, two bytes for the burst time remaining
1113+
RFM69_SPI.transfer(recipient);
1114+
RFM69_SPI.transfer(_address);
11151115

11161116
// We send the burst time remaining with the packet so the receiver knows how long to wait before trying to reply
1117-
SPI.transfer(timeRemaining.b[0]);
1118-
SPI.transfer(timeRemaining.b[1]);
1117+
RFM69_SPI.transfer(timeRemaining.b[0]);
1118+
RFM69_SPI.transfer(timeRemaining.b[1]);
11191119

11201120
for (uint8_t i = 0; i < len; i++) {
1121-
SPI.transfer(((uint8_t*)data)[i]);
1121+
RFM69_SPI.transfer(((uint8_t*)data)[i]);
11221122
}
11231123

11241124
RFM69_csn(HIGH);

0 commit comments

Comments
 (0)