microbit-samples: neatened up warning on event handlers.

This commit is contained in:
Devine 2016-08-04 15:14:40 +01:00
parent 549648d2f4
commit b573c615b1
2 changed files with 23 additions and 24 deletions

View File

@ -28,12 +28,12 @@ DEALINGS IN THE SOFTWARE.
MicroBit uBit;
// we use events abd the 'connected' variable to keep track of the status of the Bluetooth connection
void onConnected(MicroBitEvent e)
void onConnected(MicroBitEvent)
{
uBit.display.print("C");
}
void onDisconnected(MicroBitEvent e)
void onDisconnected(MicroBitEvent)
{
uBit.display.print("D");
}
@ -103,4 +103,3 @@ int main()
// sit in the idle task forever, in a power efficient sleep.
release_fiber();
}

View File

@ -34,7 +34,7 @@ MicroBitUARTService *uart;
int connected = 0;
void onConnected(MicroBitEvent e)
void onConnected(MicroBitEvent)
{
uBit.display.scroll("C");
@ -51,13 +51,13 @@ void onConnected(MicroBitEvent e)
}
void onDisconnected(MicroBitEvent e)
void onDisconnected(MicroBitEvent)
{
uBit.display.scroll("D");
connected = 0;
}
void onButtonA(MicroBitEvent e)
void onButtonA(MicroBitEvent)
{
if (connected == 0) {
return;
@ -66,7 +66,7 @@ void onButtonA(MicroBitEvent e)
uBit.display.scroll("Y");
}
void onButtonB(MicroBitEvent e)
void onButtonB(MicroBitEvent)
{
if (connected == 0) {
return;
@ -75,7 +75,7 @@ void onButtonB(MicroBitEvent e)
uBit.display.scroll("N");
}
void onButtonAB(MicroBitEvent e)
void onButtonAB(MicroBitEvent)
{
if (connected == 0) {
return;