update
This commit is contained in:
parent
d598b7b1c2
commit
b4f535d68d
|
|
@ -59,7 +59,7 @@ RFM69::RFM69(uint8_t slaveSelectPin, uint8_t interruptPin, bool isRFM69HW, SPICl
|
||||||
bool RFM69::initialize(uint8_t freqBand, uint16_t nodeID, uint8_t networkID)
|
bool RFM69::initialize(uint8_t freqBand, uint16_t nodeID, uint8_t networkID)
|
||||||
{
|
{
|
||||||
_interruptNum = digitalPinToInterrupt(_interruptPin);
|
_interruptNum = digitalPinToInterrupt(_interruptPin);
|
||||||
if (_interruptNum == NOT_AN_INTERRUPT) return false;
|
if (_interruptNum == (uint8_t)NOT_AN_INTERRUPT) return false;
|
||||||
#ifdef RF69_ATTACHINTERRUPT_TAKES_PIN_NUMBER
|
#ifdef RF69_ATTACHINTERRUPT_TAKES_PIN_NUMBER
|
||||||
_interruptNum = _interruptPin;
|
_interruptNum = _interruptPin;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -551,8 +551,8 @@ void RFM69::setCS(uint8_t newSPISlaveSelect) {
|
||||||
|
|
||||||
// set the IRQ pin
|
// set the IRQ pin
|
||||||
bool RFM69::setIrq(uint8_t newIRQPin) {
|
bool RFM69::setIrq(uint8_t newIRQPin) {
|
||||||
int _newInterruptNum = digitalPinToInterrupt(newIRQPin);
|
uint8_t _newInterruptNum = digitalPinToInterrupt(newIRQPin);
|
||||||
if (_newInterruptNum == NOT_AN_INTERRUPT) return false;
|
if (_newInterruptNum == (uint8_t)NOT_AN_INTERRUPT) return false;
|
||||||
#ifdef RF69_ATTACHINTERRUPT_TAKES_PIN_NUMBER
|
#ifdef RF69_ATTACHINTERRUPT_TAKES_PIN_NUMBER
|
||||||
_newInterruptNum = newIRQPin;
|
_newInterruptNum = newIRQPin;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
2
RFM69.h
2
RFM69.h
|
|
@ -247,7 +247,7 @@ class RFM69 {
|
||||||
|
|
||||||
uint8_t _slaveSelectPin;
|
uint8_t _slaveSelectPin;
|
||||||
uint8_t _interruptPin;
|
uint8_t _interruptPin;
|
||||||
int _interruptNum;
|
uint8_t _interruptNum;
|
||||||
uint16_t _address;
|
uint16_t _address;
|
||||||
bool _spyMode;
|
bool _spyMode;
|
||||||
uint8_t _powerLevel;
|
uint8_t _powerLevel;
|
||||||
|
|
|
||||||
|
|
@ -510,7 +510,7 @@ uint8_t sendHEXPacket(RFM69& radio, uint16_t targetID, uint8_t* sendBuf, uint8_t
|
||||||
radio.DATA[ackLen-2]=='O' && radio.DATA[ackLen-1]=='K')
|
radio.DATA[ackLen-2]=='O' && radio.DATA[ackLen-1]=='K')
|
||||||
{
|
{
|
||||||
uint16_t tmp=0;
|
uint16_t tmp=0;
|
||||||
sscanf((const char*)radio.DATA, "FLX:%u:OK", &tmp);
|
sscanf((const char*)radio.DATA, "FLX:%" PRIu16 ":OK", &tmp);
|
||||||
return tmp == seq;
|
return tmp == seq;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue