diff options
Diffstat (limited to 'docs/library')
| -rw-r--r-- | docs/library/ubluetooth.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/library/ubluetooth.rst b/docs/library/ubluetooth.rst index 6e95a9e92..2d3af1bb6 100644 --- a/docs/library/ubluetooth.rst +++ b/docs/library/ubluetooth.rst @@ -52,6 +52,12 @@ Event Handling The optional *trigger* parameter allows you to set a mask of events that your program is interested in. The default is all events. + Note: the ``addr``, ``adv_data`` and ``uuid`` entries in the tuples are + references to data managed by the :mod:`ubluetooth` module (i.e. the same + instance will be re-used across multiple calls to the event handler). If + your program wants to use this data outside of the handler, then it must + copy them first, e.g. by using ``bytes(addr)`` or ``bluetooth.UUID(uuid)``. + An event handler showing all possible events:: def bt_irq(event, data): |
