Harmonize transport code (#710)
This commit is contained in:
@@ -26,7 +26,7 @@ RFM69 _radio(MY_RF69_SPI_CS, MY_RF69_IRQ_PIN, MY_RFM69HW, MY_RF69_IRQ_NUM);
|
||||
uint8_t _address;
|
||||
|
||||
|
||||
bool transportInit()
|
||||
bool transportInit(void)
|
||||
{
|
||||
// Start up the radio library (_address will be set later by the MySensors library)
|
||||
if (_radio.initialize(MY_RFM69_FREQUENCY, _address, MY_RFM69_NETWORKID)) {
|
||||
@@ -41,28 +41,28 @@ bool transportInit()
|
||||
return false;
|
||||
}
|
||||
|
||||
void transportSetAddress(uint8_t address)
|
||||
void transportSetAddress(const uint8_t address)
|
||||
{
|
||||
_address = address;
|
||||
_radio.setAddress(address);
|
||||
}
|
||||
|
||||
uint8_t transportGetAddress()
|
||||
uint8_t transportGetAddress(void)
|
||||
{
|
||||
return _address;
|
||||
}
|
||||
|
||||
bool transportSend(uint8_t to, const void* data, uint8_t len)
|
||||
bool transportSend(const uint8_t to, const void* data, const uint8_t len)
|
||||
{
|
||||
return _radio.sendWithRetry(to,data,len);
|
||||
}
|
||||
|
||||
bool transportAvailable()
|
||||
bool transportAvailable(void)
|
||||
{
|
||||
return _radio.receiveDone();
|
||||
}
|
||||
|
||||
bool transportSanityCheck()
|
||||
bool transportSanityCheck(void)
|
||||
{
|
||||
// not implemented yet
|
||||
return true;
|
||||
@@ -80,7 +80,7 @@ uint8_t transportReceive(void* data)
|
||||
return dataLen;
|
||||
}
|
||||
|
||||
void transportPowerDown()
|
||||
void transportPowerDown(void)
|
||||
{
|
||||
_radio.sleep();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user