summaryrefslogtreecommitdiff
path: root/py/vm.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-09-14 12:40:24 -0700
committerScott Shawcroft <scott@tannewt.org>2019-10-21 18:57:03 -0700
commitae30a1e5aa198bdeee7dce04194b027ff4e3d65a (patch)
treed760570174d554598113c9349c14e34d8f710246 /py/vm.c
parent84c0d6cdf8c0bff1b61ce2fa6edcd2b4a65b2556 (diff)
Refine _bleio
This PR refines the _bleio API. It was originally motivated by the addition of a new CircuitPython service that enables reading and modifying files on the device. Moving the BLE lifecycle outside of the VM motivated a number of changes to remove heap allocations in some APIs. It also motivated unifying connection initiation to the Adapter class rather than the Central and Peripheral classes which have been removed. Adapter now handles the GAP portion of BLE including advertising, which has moved but is largely unchanged, and scanning, which has been enhanced to return an iterator of filtered results. Once a connection is created (either by us (aka Central) or a remote device (aka Peripheral)) it is represented by a new Connection class. This class knows the current connection state and can discover and instantiate remote Services along with their Characteristics and Descriptors. Relates to #586
Diffstat (limited to 'py/vm.c')
-rw-r--r--py/vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/vm.c b/py/vm.c
index b5f53ee9a..353fc8810 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -758,7 +758,7 @@ unwind_jump:;
} else {
PUSH(value); // push the next iteration value
}
- DISPATCH();
+ DISPATCH_WITH_PEND_EXC_CHECK();
}
// matched against: SETUP_EXCEPT, SETUP_FINALLY, SETUP_WITH