microbit: rename of MicroBitRadioEvent methods to align with MessageBus naming conventions.

This commit is contained in:
Joe Finney 2016-02-01 17:43:17 +00:00
parent 336c30f2ec
commit 420a73673d
2 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@ class MicroBitRadioEvent
*
* @return MICROBIT_OK on success.
*/
int registerEvent(uint16_t id, uint16_t value);
int listen(uint16_t id, uint16_t value);
/**
* Disassociates the given MessageBus events with the radio channel.
@ -48,7 +48,7 @@ class MicroBitRadioEvent
*
* @return MICROBIT_OK on success.
*/
int deregisterEvent(uint16_t id, uint16_t value);
int ignore(uint16_t id, uint16_t value);
/**
* Protocol handler callback. This is called when the radio receives a packet marked as using the event protocol.

View file

@ -31,7 +31,7 @@ MicroBitRadioEvent::MicroBitRadioEvent()
*
* @return MICROBIT_OK on success.
*/
int MicroBitRadioEvent::registerEvent(uint16_t id, uint16_t value)
int MicroBitRadioEvent::listen(uint16_t id, uint16_t value)
{
return uBit.MessageBus.listen(id, value, this, &MicroBitRadioEvent::eventReceived, MESSAGE_BUS_LISTENER_IMMEDIATE);
}
@ -44,7 +44,7 @@ int MicroBitRadioEvent::registerEvent(uint16_t id, uint16_t value)
*
* @return MICROBIT_OK on success.
*/
int MicroBitRadioEvent::deregisterEvent(uint16_t id, uint16_t value)
int MicroBitRadioEvent::ignore(uint16_t id, uint16_t value)
{
return uBit.MessageBus.ignore(id, value, this, &MicroBitRadioEvent::eventReceived);
}