summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2020-08-04 18:24:37 -0400
committerDan Halbert <halbert@halwitz.org>2020-08-04 18:24:37 -0400
commitac95106b8867072cb40043a1a4298aa0317f101c (patch)
tree15ea3ddb1cf72c53e902f8afdb7ae6f87bb5460a /main.c
parenta995a5c58fa4c231fcfb8c5e0eb6a3847faabbcc (diff)
service discovery works; need to work on char and descriptor discovery
Diffstat (limited to 'main.c')
-rwxr-xr-xmain.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.c b/main.c
index 8c5c9ac37..4dd93374e 100755
--- a/main.c
+++ b/main.c
@@ -105,6 +105,12 @@ void do_str(const char *src, mp_parse_input_kind_t input_kind) {
static size_t PLACE_IN_DTCM_BSS(_pystack[CIRCUITPY_PYSTACK_SIZE / sizeof(size_t)]);
#endif
+static void reset_devices(void) {
+#if CIRCUITPY_BLEIO_HCI
+ bleio_reset();
+#endif
+}
+
void start_mp(supervisor_allocation* heap) {
reset_status_led();
autoreload_stop();
@@ -459,6 +465,8 @@ int __attribute__((used)) main(void) {
// Reset everything and prep MicroPython to run boot.py.
reset_port();
+ // Port-independent devices, like CIRCUITPY_BLEIO_HCI.
+ reset_devices();
reset_board();
// Turn on autoreload by default but before boot.py in case it wants to change it.