examples/bluetooth/ble_uart_peripheral: Use append mode for RX char.

This commit is contained in:
Jim Mussared 2019-10-28 17:33:29 +11:00 committed by Damien George
parent ca3d4c84e4
commit 25946d1ef4
1 changed files with 2 additions and 2 deletions

View File

@ -22,8 +22,8 @@ class BLEUART:
self._ble.active(True)
self._ble.irq(handler=self._irq)
((self._tx_handle, self._rx_handle,),) = self._ble.gatts_register_services((_UART_SERVICE,))
# Increase the size of the rx buffer.
self._ble.gatts_write(self._rx_handle, bytes(rxbuf))
# Increase the size of the rx buffer and enable append mode.
self._ble.gatts_set_buffer(self._rx_handle, rxbuf, True)
self._connections = set()
self._rx_buffer = bytearray()
self._handler = None