forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackground.c
More file actions
36 lines (28 loc) · 762 Bytes
/
Copy pathbackground.c
File metadata and controls
36 lines (28 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
//
// SPDX-License-Identifier: MIT
#include "background.h"
#include "py/runtime.h"
#include "supervisor/port.h"
#if CIRCUITPY_BLEIO
#include "common-hal/_bleio/__init__.h"
#endif
#include <zephyr/kernel.h>
void port_start_background_tick(void) {
}
void port_finish_background_tick(void) {
}
void port_background_tick(void) {
// No, ticks. We use Zephyr threads instead.
}
void port_background_task(void) {
// Make sure time advances in the simulator.
#if defined(CONFIG_ARCH_POSIX)
k_busy_wait(100);
#endif
#if CIRCUITPY_BLEIO
bleio_background();
#endif
}