From 96ea39e90d3fe1e4656f927497418733927bffbc Mon Sep 17 00:00:00 2001 From: putyavka Date: Wed, 2 Dec 2020 18:54:09 +0200 Subject: [PATCH] Update ble_uart_peripheral.py _IRQ_* constant didn't equal official documentation values https://docs.micropython.org/en/latest/library/ubluetooth.html Tested on ESP-WROOM-32 (firmware v1.13) --- ble_examples/ble_uart_peripheral.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ble_examples/ble_uart_peripheral.py b/ble_examples/ble_uart_peripheral.py index 14f7102..d90c20f 100644 --- a/ble_examples/ble_uart_peripheral.py +++ b/ble_examples/ble_uart_peripheral.py @@ -4,9 +4,9 @@ from ble_advertising import advertising_payload from micropython import const -_IRQ_CENTRAL_CONNECT = const(1 << 0) -_IRQ_CENTRAL_DISCONNECT = const(1 << 1) -_IRQ_GATTS_WRITE = const(1 << 2) +_IRQ_CENTRAL_CONNECT = const(1) +_IRQ_CENTRAL_DISCONNECT = const(2) +_IRQ_GATTS_WRITE = const(3) _UART_UUID = bluetooth.UUID('6E400001-B5A3-F393-E0A9-E50E24DCCA9E') _UART_TX = (bluetooth.UUID('6E400003-B5A3-F393-E0A9-E50E24DCCA9E'), bluetooth.FLAG_NOTIFY,)