Repo restyled using astyle (#683)

The rules are in .tools/astyle/config/style.cfg
and can also be reviewed at
https://www.mysensors.org/view/260#coding-guidelines-core-library
This commit is contained in:
Patrick Fallberg
2016-12-07 23:44:29 +01:00
committed by GitHub
parent d4c4ab82ea
commit 8e1ef13804
167 changed files with 16103 additions and 15168 deletions
+23 -14
View File
@@ -22,43 +22,52 @@
#include "MyTransport.h"
#include "drivers/RFM95/RFM95.h"
bool transportInit(void) {
bool transportInit(void)
{
const bool result = RFM95_initialise(MY_RFM95_FREQUENCY);
#if !defined(MY_GATEWAY_FEATURE) && !defined(MY_RFM95_ATC_MODE_DISABLED)
// only enable ATC mode nodes
RFM95_ATCmode(true, MY_RFM95_ATC_TARGET_RSSI);
#endif
#if !defined(MY_GATEWAY_FEATURE) && !defined(MY_RFM95_ATC_MODE_DISABLED)
// only enable ATC mode nodes
RFM95_ATCmode(true, MY_RFM95_ATC_TARGET_RSSI);
#endif
return result;
}
void transportSetAddress(uint8_t address) {
void transportSetAddress(uint8_t address)
{
RFM95_setAddress(address);
}
uint8_t transportGetAddress(void) {
uint8_t transportGetAddress(void)
{
return RFM95_getAddress();
}
bool transportSend(uint8_t to, const void* data, uint8_t len) {
bool transportSend(uint8_t to, const void* data, uint8_t len)
{
return RFM95_sendWithRetry(to, data, len);
}
bool transportAvailable(void) {
bool transportAvailable(void)
{
return RFM95_available();
}
bool transportSanityCheck(void) {
bool transportSanityCheck(void)
{
return RFM95_sanityCheck();
}
uint8_t transportReceive(void* data) {
uint8_t transportReceive(void* data)
{
return RFM95_recv((uint8_t*)data);
}
}
void transportPowerDown(void) {
void transportPowerDown(void)
{
(void)RFM95_sleep();
}
int16_t transportGetSignalStrength(void) {
int16_t transportGetSignalStrength(void)
{
return RFM95_getRSSI();
}