Skip to content

Commit 94866fc

Browse files
Merge branch 'adafruit:main' into stm
2 parents a0074c3 + 49207fb commit 94866fc

File tree

656 files changed

+13902
-3986
lines changed

Some content is hidden

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

656 files changed

+13902
-3986
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

.github/workflows/pre-commit.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
- name: Install deps
1818
run: |
1919
sudo apt-add-repository -y -u ppa:pybricks/ppa
20-
sudo apt-get install -y black gettext uncrustify
21-
pip3 install -r requirements-dev.txt
20+
sudo apt-get install -y gettext uncrustify
21+
pip3 install black polib pyyaml
2222
- name: Populate selected submodules
2323
run: git submodule update --init extmod/ulab
2424
- name: Set PY
@@ -28,3 +28,12 @@ jobs:
2828
path: ~/.cache/pre-commit
2929
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
3030
- uses: pre-commit/[email protected]
31+
- name: Make patch
32+
if: failure()
33+
run: git diff > ~/pre-commit.patch
34+
- name: Upload patch
35+
if: failure()
36+
uses: actions/upload-artifact@v2
37+
with:
38+
name: patch
39+
path: ~/pre-commit.patch

.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

.readthedocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
version: 2
1010

11+
build:
12+
os: ubuntu-20.04
13+
tools:
14+
python: "3.9"
15+
1116
submodules:
1217
include:
1318
- extmod/ulab
@@ -16,6 +21,5 @@ formats:
1621
- pdf
1722

1823
python:
19-
version: 3
2024
install:
2125
- requirements: docs/requirements.txt

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

0 commit comments

Comments
 (0)