Skip to content

Commit 27b137f

Browse files
committed
Merge branch 'main' into monitor-mode
2 parents 4e20785 + 0f9448d commit 27b137f

File tree

515 files changed

+6754
-2180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

515 files changed

+6754
-2180
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ jobs:
145145
run: |
146146
git describe --dirty --tags
147147
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
148+
- name: Set up Python 3.8
149+
uses: actions/setup-python@v1
150+
with:
151+
python-version: 3.8
148152
- name: Install dependencies
149153
run: |
150154
brew install gettext

.gitmodules

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@
44

55
[submodule "lib/axtls"]
66
path = lib/axtls
7-
url = https://github.com/pfalcon/axtls
8-
branch = micropython
7+
url = https://github.com/micropython/axtls.git
98
[submodule "lib/libffi"]
109
path = lib/libffi
1110
url = https://github.com/atgreen/libffi
1211
[submodule "lib/berkeley-db-1.xx"]
1312
path = lib/berkeley-db-1.xx
1413
url = https://github.com/pfalcon/berkeley-db-1.xx
15-
[submodule "lib/uzlib"]
16-
path = lib/uzlib
17-
url = https://github.com/pfalcon/uzlib
1814
[submodule "tools/uf2"]
1915
path = tools/uf2
2016
url = https://github.com/Microsoft/uf2.git

LICENSE

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,67 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
22+
23+
--------------------------------------------------------------------------------
24+
25+
Unless specified otherwise (see below), the above license and copyright applies
26+
to all files in this repository.
27+
28+
Individual files may include additional copyright holders.
29+
30+
The various ports of MicroPython may include third-party software that is
31+
licensed under different terms. These licenses are summarised in the tree
32+
below, please refer to these files and directories for further license and
33+
copyright information. Note that (L)GPL-licensed code listed below is only
34+
used during the build process and is not part of the compiled source code.
35+
36+
/ (MIT)
37+
/drivers
38+
/cc3000 (BSD-3-clause)
39+
/cc3100 (BSD-3-clause)
40+
/wiznet5k (BSD-3-clause)
41+
/lib
42+
/asf4 (Apache-2.0)
43+
/axtls (BSD-3-clause)
44+
/config
45+
/scripts
46+
/config (GPL-2.0-or-later)
47+
/Rules.mak (GPL-2.0)
48+
/berkeley-db-1xx (BSD-4-clause)
49+
/btstack (See btstack/LICENSE)
50+
/cmsis (BSD-3-clause)
51+
/crypto-algorithms (NONE)
52+
/libhydrogen (ISC)
53+
/littlefs (BSD-3-clause)
54+
/lwip (BSD-3-clause)
55+
/mynewt-nimble (Apache-2.0)
56+
/nrfx (BSD-3-clause)
57+
/nxp_driver (BSD-3-Clause)
58+
/oofatfs (BSD-1-clause)
59+
/pico-sdk (BSD-3-clause)
60+
/re15 (BSD-3-clause)
61+
/stm32lib (BSD-3-clause)
62+
/tinytest (BSD-3-clause)
63+
/tinyusb (MIT)
64+
/uzlib (Zlib)
65+
/logo (uses OFL-1.1)
66+
/ports
67+
/cc3200
68+
/hal (BSD-3-clause)
69+
/simplelink (BSD-3-clause)
70+
/FreeRTOS (GPL-2.0 with FreeRTOS exception)
71+
/stm32
72+
/usbd*.c (MCD-ST Liberty SW License Agreement V2)
73+
/stm32_it.* (MIT + BSD-3-clause)
74+
/system_stm32*.c (MIT + BSD-3-clause)
75+
/boards
76+
/startup_stm32*.s (BSD-3-clause)
77+
/*/stm32*.h (BSD-3-clause)
78+
/usbdev (MCD-ST Liberty SW License Agreement V2)
79+
/usbhost (MCD-ST Liberty SW License Agreement V2)
80+
/teensy
81+
/core (PJRC.COM)
82+
/zephyr
83+
/src (Apache-2.0)
84+
/tools
85+
/dfu.py (LGPL-3.0-only)

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ def autoapi_prepare_jinja_env(jinja_env):
209209
"ports/stm/ref",
210210
"ports/unix",
211211
"py",
212+
"shared/*",
212213
"shared-bindings/util.*",
213214
"shared-module",
214215
"supervisor",

devices/ble_hci/common-hal/_bleio/Adapter.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,17 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self,
666666
}
667667
}
668668

669-
// Peer address, which we don't use (no directed advertising).
670-
bt_addr_le_t empty_addr = { 0 };
669+
// Peer address, for directed advertising
670+
bt_addr_le_t peer_addr = { 0 };
671+
672+
// Copy peer address, if supplied.
673+
if (directed_to) {
674+
mp_buffer_info_t bufinfo;
675+
if (mp_get_buffer(directed_to->bytes, &bufinfo, MP_BUFFER_READ)) {
676+
peer_addr.type = directed_to->type;
677+
memcpy(&peer_addr.a.val, bufinfo.buf, sizeof(peer_addr.a.val));
678+
}
679+
}
671680

672681
bool extended =
673682
advertising_data_len > self->max_adv_data_len || scan_response_data_len > self->max_adv_data_len;
@@ -696,7 +705,7 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self,
696705
interval_units, // max interval
697706
0b111, // channel map: channels 37, 38, 39
698707
anonymous ? BT_ADDR_LE_RANDOM : BT_ADDR_LE_PUBLIC,
699-
&empty_addr, // peer_addr,
708+
&peer_addr, // peer_addr,
700709
0x00, // filter policy: no filter
701710
DEFAULT_TX_POWER,
702711
BT_HCI_LE_EXT_SCAN_PHY_1M, // Secondary PHY to use
@@ -746,7 +755,7 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self,
746755
interval_units, // max interval
747756
adv_type,
748757
anonymous ? BT_ADDR_LE_RANDOM : BT_ADDR_LE_PUBLIC,
749-
&empty_addr,
758+
&peer_addr,
750759
0b111, // channel map: channels 37, 38, 39
751760
0x00 // filter policy: no filter
752761
));

devices/ble_hci/common-hal/_bleio/CharacteristicBuffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <string.h>
2828
#include <stdio.h>
2929

30-
#include "lib/utils/interrupt_char.h"
30+
#include "shared/runtime/interrupt_char.h"
3131
#include "py/runtime.h"
3232
#include "py/stream.h"
3333

devices/ble_hci/common-hal/_bleio/Connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <string.h>
3333
#include <stdio.h>
3434

35-
#include "lib/utils/interrupt_char.h"
35+
#include "shared/runtime/interrupt_char.h"
3636
#include "py/gc.h"
3737
#include "py/objlist.h"
3838
#include "py/objstr.h"

devices/ble_hci/common-hal/_bleio/PacketBuffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <string.h>
2828
#include <stdio.h>
2929

30-
#include "lib/utils/interrupt_char.h"
30+
#include "shared/runtime/interrupt_char.h"
3131
#include "py/runtime.h"
3232
#include "py/stream.h"
3333

docs/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@ Building the documentation locally
1313
If you're making changes to the documentation, you should build the
1414
documentation locally so that you can preview your changes.
1515

16-
Install Sphinx, recommonmark, and optionally (for the RTD-styling), sphinx_rtd_theme,
17-
preferably in a virtualenv:
16+
Install the necessary packages, preferably in a virtualenv, in `circuitpython/`:
1817

19-
pip install sphinx
20-
pip install recommonmark
21-
pip install sphinx_rtd_theme
18+
pip install -r requirements-doc.txt
2219

2320
In `circuitpython/`, build the docs:
2421

docs/design_guide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ For example, a user can then use ``deinit()```::
9999
import board
100100
import time
101101

102-
led = digitalio.DigitalInOut(board.D13)
102+
led = digitalio.DigitalInOut(board.LED)
103103
led.direction = digitalio.Direction.OUTPUT
104104

105105
for i in range(10):
@@ -119,7 +119,7 @@ Alternatively, using a ``with`` statement ensures that the hardware is deinitial
119119
import board
120120
import time
121121

122-
with digitalio.DigitalInOut(board.D13) as led:
122+
with digitalio.DigitalInOut(board.LED) as led:
123123
led.direction = digitalio.Direction.OUTPUT
124124

125125
for i in range(10):

0 commit comments

Comments
 (0)