microbit: rename of MicroBitRadioEvent methods to align with MessageBus naming conventions.
This commit is contained in:
parent
336c30f2ec
commit
420a73673d
2 changed files with 4 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue