Merge pull request #236 from brijohn/fix-return-statements
Fix return statements
This commit is contained in:
5 files changed
+11
-8
No files matched your search
@@ -86,7 +86,7 @@ int attachInterrupt(uint32_t pin, voidFuncPtr callback, uint32_t mode)
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (int ch = 0; ch < NUMBER_OF_GPIO_TE; ch++) {
|
||||
|
||||
+2
-1
@@ -114,8 +114,9 @@ int _write (int fd, const void *buf, size_t count)
|
||||
|
||||
if ( Serial )
|
||||
{
|
||||
Serial.write( (const uint8_t *) buf, count);
|
||||
return Serial.write( (const uint8_t *) buf, count);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -81,6 +81,8 @@ bool BLEClientHidAdafruit::begin(void)
|
||||
// set notify callback
|
||||
_kbd_boot_input.setNotifyCallback(kbd_client_notify_cb);
|
||||
_mse_boot_input.setNotifyCallback(mse_client_notify_cb);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void BLEClientHidAdafruit::setKeyboardReportCallback(kbd_callback_t fp)
|
||||
@@ -140,12 +142,12 @@ bool BLEClientHidAdafruit::keyboardPresent(void)
|
||||
|
||||
bool BLEClientHidAdafruit::enableKeyboard(void)
|
||||
{
|
||||
_kbd_boot_input.enableNotify();
|
||||
return _kbd_boot_input.enableNotify();
|
||||
}
|
||||
|
||||
bool BLEClientHidAdafruit::disableKeyboard(void)
|
||||
{
|
||||
_kbd_boot_input.disableNotify();
|
||||
return _kbd_boot_input.disableNotify();
|
||||
}
|
||||
|
||||
void BLEClientHidAdafruit::_handle_kbd_input(uint8_t* data, uint16_t len)
|
||||
@@ -171,12 +173,12 @@ bool BLEClientHidAdafruit::mousePresent(void)
|
||||
|
||||
bool BLEClientHidAdafruit::enableMouse(void)
|
||||
{
|
||||
_mse_boot_input.enableNotify();
|
||||
return _mse_boot_input.enableNotify();
|
||||
}
|
||||
|
||||
bool BLEClientHidAdafruit::disableMouse(void)
|
||||
{
|
||||
_mse_boot_input.disableNotify();
|
||||
return _mse_boot_input.disableNotify();
|
||||
}
|
||||
|
||||
void BLEClientHidAdafruit::_handle_mse_input(uint8_t* data, uint16_t len)
|
||||
|
||||
@@ -81,7 +81,7 @@ EddyStoneUrl::EddyStoneUrl(int8_t rssiAt0m, const char* url)
|
||||
_url = url;
|
||||
}
|
||||
|
||||
bool EddyStoneUrl::setUrl(const char* url)
|
||||
void EddyStoneUrl::setUrl(const char* url)
|
||||
{
|
||||
_url = url;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class EddyStoneUrl
|
||||
EddyStoneUrl(void);
|
||||
EddyStoneUrl(int8_t rssiAt0m, const char* url = NULL);
|
||||
|
||||
bool setUrl(const char* url);
|
||||
void setUrl(const char* url);
|
||||
void setRssi(int8_t rssiAt0m);
|
||||
|
||||
bool start(void);
|
||||
|
||||
Reference in new issue
Block a user