Skip to content

Commit c55183f

Browse files
committed
Merge remote-tracking branch 'adafruit/master' into gc_rev_b
2 parents 48928d4 + 57b61a9 commit c55183f

File tree

87 files changed

+44956
-313
lines changed

Some content is hidden

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

87 files changed

+44956
-313
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*.mpy binary
1414
*.deb binary
1515
*.zip binary
16+
*.pdf binary
1617

1718
# These should also not be modified by git.
1819
tests/basics/string_cr_conversion.py -text

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,6 @@
8383
[submodule "tools/huffman"]
8484
path = tools/huffman
8585
url = https://github.com/tannewt/huffman.git
86+
[submodule "tools/adabot"]
87+
path = tools/adabot
88+
url = https://github.com/adafruit/adabot.git

.travis.yml

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
sudo: required
2-
dist: trusty
2+
dist: xenial
33
language: c
44
compiler:
55
- gcc
66
git:
7-
depth: 6
7+
depth: 1
88

99
# Each item under 'env' is a separate Travis job to execute.
1010
# They run in separate environments, so each one must take the time
@@ -21,18 +21,29 @@ git:
2121
# that SDK is shortest and add it there. In the case of major re-organizations,
2222
# just try to make the builds "about equal in run time"
2323
env:
24-
- TRAVIS_TESTS="unix docs translations" TRAVIS_BOARDS="feather_huzzah circuitplayground_express grandcentral_m4_express pca10056 pca10059 feather_nrf52832 feather_nrf52840_express makerdiary_nrf52840_mdk" TRAVIS_SDK=arm:nrf:esp8266
24+
- TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="feather_huzzah circuitplayground_express grandcentral_m4_express pca10056 pca10059 feather_nrf52832 feather_nrf52840_express makerdiary_nrf52840_mdk" TRAVIS_SDK=arm:nrf:esp8266
2525
- TRAVIS_BOARDS="metro_m0_express metro_m4_express pirkey_m0 trellis_m4_express trinket_m0" TRAVIS_SDK=arm
2626
- TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow" TRAVIS_SDK=arm
2727
- TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300" TRAVIS_SDK=arm
28-
- TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express" TRAVIS_SDK=arm
28+
- TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick" TRAVIS_SDK=arm
2929

3030
addons:
3131
artifacts:
3232
paths:
3333
- $(ls -d1 bin/*/* | tr "\n" ":")
3434
target_paths: /
3535

36+
deploy:
37+
provider: releases
38+
api_key:
39+
secure: "jdqVFw6itRY4qwQF4ReXo0uaymT+Mob6RhYX0lw8KWFNqBgHnLVuKmKKcGMEuRvBVMPkvxF7bMuOQzSBOunqwlHFse3oMzdWvQODv1zwV7pSRXGwTdIvTPbBjKWxnBG9uSNRf2R5AMflJFUxy2CbtBpgvNzr+4VLREZDrrjEu8C1iTtXGpSm5AQ5iIp2fkMAWD85FP7CQPpkqRoxhSIFZmTdurfYRmenq1OZ/4SeD5TESKcyvqJNzVT9z210B3cg3eAkP6ukvelW4qE2zgIANqUkGqvDEnAvEII9M89kuwhCMAekdfwnUSPrry+g77i1dUZHoRN1+MFj+waYtPaqxdYo2G1sysa6enxlu4jHMR5MfMk9eKHgaNgL3PiyANusYSS44amh8QIiVaX5nw82myZDCpQOZW7YqJKE6WX70Lbs4mS+wIs+ig4KIXO1B0p9kMb0OeVjHRl+KcXsWGRu/ECG/ExpqlVIssSPU407LohMXT2cJ37CY/R/EeK2XSDsQ2M3L3EAGUjCJdBGuwsOJ+2lG+HQpAVu9vAB4kq5jy9Ye+MG+8Xlkly3XZZ5+FkXyYxKnXb26/QVv0e5sIG5OmdJCPYFaH2J1QdKo7CdhEcBtrf6DMPWaimGMldShFqzLjOz3b3qLysRxFF0aGb7ipKPa57vawNzYHoPAViOcXQ="
40+
file:
41+
- $(ls -d1 bin/*/* | tr "\n" ":")
42+
skip_cleanup: true
43+
draft: true
44+
on:
45+
tags: true
46+
3647
notifications:
3748
webhooks:
3849
urls:
@@ -44,27 +55,34 @@ notifications:
4455
on_error: always
4556

4657
before_script:
58+
# Expand the git tree back to 4.0.0-alpha.1 and then fetch the latest tag.
59+
- LAST_TAG=`git ls-remote --quiet --tags --sort=version:refname | egrep -o "refs/tags/[0-9]+.*\$" | tail -n 1`
60+
- git fetch --shallow-exclude=4.0.0-alpha.1 || git fetch --unshallow
61+
- git fetch --depth 1 origin $LAST_TAG:$LAST_TAG
62+
- git describe --dirty --always --tags
4763
- function var_search () { case "$1" in *$2*) true;; *) false;; esac; }
4864
- sudo dpkg --add-architecture i386
4965

50-
- (! var_search "${TRAVIS_SDK-}" arm || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
66+
67+
- (! var_search "${TRAVIS_SDK-}" arm || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
5168

5269
# For nrf builds
5370
- (! var_search "${TRAVIS_SDK-}" nrf || sudo ports/nrf/bluetooth/download_ble_stack.sh)
5471

5572
# For huzzah builds
56-
- (! var_search "${TRAVIS_SDK-}" esp8266 || (wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar -C .. -xavf xtensa-lx106-elf-standalone.tar.gz))
73+
- (! var_search "${TRAVIS_SDK-}" esp8266 || (wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar -C .. -xaf xtensa-lx106-elf-standalone.tar.gz))
5774
- if var_search "${TRAVIS_SDK-}" esp8266 ; then PATH=$(readlink -f ../xtensa-lx106-elf/bin):$PATH; fi
5875

5976
# For coverage testing (upgrade is used to get latest urllib3 version)
60-
- ([[ -z "$TRAVIS_TESTS" ]] || sudo apt-get install -y python3-pip)
77+
- sudo apt-get install -y python3-pip
78+
- pip3 install --user sh click
6179
- ([[ -z "$TRAVIS_TESTS" ]] || sudo pip install --upgrade cpp-coveralls)
62-
- (! var_search "${TRAVIS_TESTS-}" docs || sudo pip install 'Sphinx<1.8.0' sphinx-rtd-theme recommonmark)
63-
- (! var_search "${TRAVIS_TESTS-}" translations || sudo pip3 install polib)
80+
- (! var_search "${TRAVIS_TESTS-}" docs || pip install --user 'Sphinx<1.8.0' sphinx-rtd-theme recommonmark)
81+
- (! var_search "${TRAVIS_TESTS-}" translations || pip3 install --user polib)
6482

6583
# report some good version numbers to the build
6684
- gcc --version
67-
- (! var_search "${TRAVIS_SDK-}" elf || arm-none-eabi-gcc --version)
85+
- (! var_search "${TRAVIS_SDK-}" arm || arm-none-eabi-gcc --version)
6886
- (! var_search "${TRAVIS_SDK-}" esp8266 || xtensa-lx106-elf-gcc --version)
6987
- python3 --version
7088

@@ -74,9 +92,8 @@ script:
7492
- make -C mpy-cross -j2
7593
- echo -en 'travis_fold:end:mpy-cross\\r'
7694

77-
- echo 'Building Adafruit binaries' && echo -en 'travis_fold:start:adafruit-bins\\r'
78-
- (for board in $TRAVIS_BOARDS; do TRAVIS_BOARD=$board tools/build_adafruit_bins.sh || exit $?; done)
79-
- echo -en 'travis_fold:end:adafruit-bins\\r'
95+
- cd tools && python3 build_adafruit_bins.py
96+
- cd ..
8097

8198
- echo 'Building unix' && echo -en 'travis_fold:start:unix\\r'
8299
- (! var_search "${TRAVIS_TESTS-}" unix || (make -C ports/unix deplibs -j2 && make -C ports/unix -j2 && make -C ports/unix coverage -j2))
@@ -88,19 +105,19 @@ script:
88105

89106
# run tests with coverage info
90107
- echo 'Test all' && echo -en 'travis_fold:start:test_all\\r'
91-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1))
108+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1))
92109
- echo -en 'travis_fold:end:test_all\\r'
93110

94111
- echo 'Test threads' && echo -en 'travis_fold:start:test_threads\\r'
95-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread))
112+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread))
96113
- echo -en 'travis_fold:end:test_threads\\r'
97114

98115
- echo 'Testing with native' && echo -en 'travis_fold:start:test_native\\r'
99-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native))
116+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native))
100117
- echo -en 'travis_fold:end:test_native\\r'
101118

102119
- (echo 'Testing with mpy' && echo -en 'travis_fold:start:test_mpy\\r')
103-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float))
120+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float))
104121
- echo -en 'travis_fold:end:test_mpy\\r'
105122

106123
- (echo 'Building docs' && echo -en 'travis_fold:start:build_docs\\r')
@@ -114,5 +131,7 @@ script:
114131
# run coveralls coverage analysis (try to, even if some builds/tests failed)
115132
#- (cd ports/unix && coveralls --root ../.. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod)
116133

134+
- (! var_search "${TRAVIS_TESTS-}" website || (cd tools && python3 build_board_info.py && cd ..))
135+
117136
after_failure:
118137
- (cd tests && for exp in *.exp; do testbase=$(basename $exp .exp); echo -e "\nFAILURE $testbase"; diff -u $testbase.exp $testbase.out; done)

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Other
6565
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6666

6767
- `Electronic Cats Meow Meow <https://electroniccats.com/gomeow/>`__
68+
- `Electronic Cats CatWAN USB Stick <https://electroniccats.com/producto/catwan_usb_stick/>`__
6869

6970

7071
Download

docs/drivers.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Motion relating sensing including ``acceleration``, ``magnetic``, ``gyro``, and
122122
FXAS21002C Gyroscope <https://circuitpython.readthedocs.io/projects/fxas21002c/en/latest/>
123123
FXOS8700 Accelerometer <https://circuitpython.readthedocs.io/projects/fxos8700/en/latest/>
124124
GPS Global Position <https://circuitpython.readthedocs.io/projects/gps/en/latest/>
125-
L3GD20 Gyroscope <https://circuitpython.readthedocs.io/projects/sd/l3gd20/latest/>
125+
L3GD20 Gyroscope <https://circuitpython.readthedocs.io/projects/l3gd20/latest/>
126126
LIS3DH Accelerometer <https://circuitpython.readthedocs.io/projects/lis3dh/en/latest/>
127127
LSM303 Accelerometer and Magnetometer <https://circuitpython.readthedocs.io/projects/lsm303/en/latest/>
128128
LSM9DS0 Accelerometer, Magnetometer, Gyroscope and Temperature <https://circuitpython.readthedocs.io/projects/lsm9ds0/en/latest/>
@@ -147,14 +147,14 @@ equivalent carbon dioxide (``eco2`` / ``eCO2``), and total volatile organic comp
147147
CCS811 Air Quality <https://circuitpython.readthedocs.io/projects/ccs811/en/latest/>
148148
DHT Temperature and Humidity <https://circuitpython.readthedocs.io/projects/dht/en/latest/>
149149
DS18x20 Temperature <https://circuitpython.readthedocs.io/projects/ds18x20/en/latest/>
150-
HTU21D Temperature and Humidity <https://circuitpython.readthedocs.io/projects/htu21d/en/latest>
150+
HTU21D Temperature and Humidity <https://circuitpython.readthedocs.io/projects/htu21d/en/latest/>
151151
MAX31865 Thermocouple Amplifier, Temperature <https://circuitpython.readthedocs.io/projects/max31865/en/latest/>
152152
MAX31855 Thermocouple Amplifier, Temperature <https://circuitpython.readthedocs.io/projects/max31855/en/latest/>
153153
MAX31856 Thermocouple Amplifier, Temperature <https://circuitpython.readthedocs.io/projects/max31856/en/latest/>
154154
MCP9808 Temperature <https://circuitpython.readthedocs.io/projects/mcp9808/en/latest/>
155155
MP115A2 Barometric Pressure, Temperature <https://circuitpython.readthedocs.io/projects/mpl115a2/en/latest/>
156156
MPL3115A2 Barometric Pressure, Altitude and Temperature Sensor <https://circuitpython.readthedocs.io/projects/mpl3115a2/en/latest/>
157-
MPRLS Ported Absolute Pressure <https://circuitpython.readthedocs.io/projects/mprls/en/latest>
157+
MPRLS Ported Absolute Pressure <https://circuitpython.readthedocs.io/projects/mprls/en/latest/>
158158
SGP30 Air Quality <https://circuitpython.readthedocs.io/projects/sgp30/en/latest/>
159159
SHT31-D Temperature and Humidity <https://circuitpython.readthedocs.io/projects/sht31d/en/latest/>
160160
Si7021 Temperature and Humidity <https://circuitpython.readthedocs.io/projects/si7021/en/latest/>
@@ -186,8 +186,8 @@ These sensors measure the ``distance`` to another object and may also measure li
186186

187187
.. toctree::
188188

189-
Garmin LIDARLite I2C <https://circuitpython.readthedocs.io/projects/lidarlite/en/latest>
190-
TFmini IR Time of Flight ~30cm - 12m <https://circuitpython.readthedocs.io/projects/tfmini/en/latest>
189+
Garmin LIDARLite I2C <https://circuitpython.readthedocs.io/projects/lidarlite/en/latest/>
190+
TFmini IR Time of Flight ~30cm - 12m <https://circuitpython.readthedocs.io/projects/tfmini/en/latest/>
191191
VL6180x 5 - 100 mm <https://circuitpython.readthedocs.io/projects/vl6180x/en/latest/>
192192
VL53L0x ~30 - 1000 mm <https://circuitpython.readthedocs.io/projects/vl53l0x/en/latest/>
193193
HC-SR04 Ultrasonic Range Sensors <https://circuitpython.readthedocs.io/projects/hcsr04/en/latest/>
@@ -234,7 +234,7 @@ Miscellaneous
234234
Si4713 Stereo FM Transmitter <https://circuitpython.readthedocs.io/projects/si4713/en/latest/>
235235
AMG88xx Grid-Eye IR Camera <https://circuitpython.readthedocs.io/projects/amg88xx/en/latest/>
236236
Trellis 4x4 Keypad <https://circuitpython.readthedocs.io/projects/trellis/en/latest/>
237-
NeoTrellis 4x4 Keypad <https://circuitpython.readthedocs.io/projects/neotrellis/en/latest>
237+
NeoTrellis 4x4 Keypad <https://circuitpython.readthedocs.io/projects/neotrellis/en/latest/>
238238
NeoTrellis M4 4x8 Keypad <https://circuitpython.readthedocs.io/projects/trellism4/en/latest/>
239239
DRV2605 Haptic Motor Controller <https://circuitpython.readthedocs.io/projects/drv2605/en/latest/>
240240
MAX9744 Audio Amplifier <https://circuitpython.readthedocs.io/projects/max9744/en/latest/>
@@ -247,3 +247,4 @@ Miscellaneous
247247
Matrix Keypad <https://circuitpython.readthedocs.io/projects/matrixkeypad/en/latest/>
248248
VS1053 Audio Codec <https://circuitpython.readthedocs.io/projects/vs1053/en/latest/>
249249
FRAM Non-Volatile Memory <https://circuitpython.readthedocs.io/projects/fram/en/latest/>
250+
74HC595 Shift Register <https://circuitpython.readthedocs.io/projects/74hc595/en/latest/>

lib/oofatfs/ff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2579,8 +2579,8 @@ FRESULT create_name ( /* FR_OK: successful, FR_INVALID_NAME: could not create
25792579
if (w < 0x80 && chk_chr("\"*:<>\?|\x7F", w)) return FR_INVALID_NAME; /* Reject illegal characters for LFN */
25802580
lfn[di++] = w; /* Store the Unicode character */
25812581
}
2582-
cf = ((w < ' ') || ((w == '/' || w == '\\') && p[si+1] < ' ')) ? NS_LAST : 0; /* Set last segment flag if end of the path */
25832582
*path = &p[si]; /* Return pointer to the next segment */
2583+
cf = (w < ' ') ? NS_LAST : 0; /* Set last segment flag if end of the path */
25842584
#if _FS_RPATH != 0
25852585
if ((di == 1 && lfn[di - 1] == '.') ||
25862586
(di == 2 && lfn[di - 1] == '.' && lfn[di - 2] == '.')) { /* Is this segment a dot name? */

lib/tinyusb

Submodule tinyusb updated 182 files

ports/atmel-samd/Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,13 @@ BASE_CFLAGS = \
6161
-Wno-endif-labels \
6262
-Wstrict-prototypes \
6363
-Werror-implicit-function-declaration \
64-
-Wpointer-arith \
6564
-Wfloat-equal \
6665
-Wundef \
6766
-Wshadow \
6867
-Wwrite-strings \
6968
-Wsign-compare \
7069
-Wmissing-format-attribute \
7170
-Wno-deprecated-declarations \
72-
-Wpacked \
7371
-Wnested-externs \
7472
-Wunreachable-code \
7573
-Wcast-align \
@@ -265,8 +263,8 @@ SRC_C = \
265263
lib/oofatfs/ff.c \
266264
lib/oofatfs/option/ccsbcs.c \
267265
lib/timeutils/timeutils.c \
268-
lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/dcd.c \
269-
lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/hal.c \
266+
lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/dcd_$(CHIP_FAMILY).c \
267+
lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/hal_$(CHIP_FAMILY).c \
270268
lib/utils/buffer_helper.c \
271269
lib/utils/context_manager_helpers.c \
272270
lib/utils/interrupt_char.c \
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
#include "boards/board.h"
28+
29+
void board_init(void)
30+
{
31+
}
32+
33+
bool board_requests_safe_mode(void) {
34+
return false;
35+
}
36+
37+
void reset_board(void) {
38+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#define MICROPY_HW_BOARD_NAME "Electronic Cats CatWAN USBStick"
2+
#define MICROPY_HW_MCU_NAME "samd21e18"
3+
4+
#define MICROPY_HW_LED_RX &pin_PA14
5+
6+
#define MICROPY_PORT_A (PORT_PA14)
7+
#define MICROPY_PORT_B (0)
8+
#define MICROPY_PORT_C (0)
9+
10+
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
11+
12+
#define DEFAULT_SPI_BUS_SCK (&pin_PA19)
13+
#define DEFAULT_SPI_BUS_MOSI (&pin_PA18)
14+
#define DEFAULT_SPI_BUS_MISO (&pin_PA22)
15+
16+
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)
17+
18+
#define IGNORE_PIN_PA00 1
19+
#define IGNORE_PIN_PA01 1
20+
#define IGNORE_PIN_PA02 1
21+
#define IGNORE_PIN_PA03 1
22+
#define IGNORE_PIN_PA05 1
23+
#define IGNORE_PIN_PA06 1
24+
#define IGNORE_PIN_PA07 1
25+
#define IGNORE_PIN_PA08 1
26+
#define IGNORE_PIN_PA09 1
27+
#define IGNORE_PIN_PA10 1
28+
#define IGNORE_PIN_PA11 1
29+
#define IGNORE_PIN_PA12 1
30+
#define IGNORE_PIN_PA13 1
31+
#define IGNORE_PIN_PA20 1
32+
#define IGNORE_PIN_PA21 1
33+
// USB is always used.
34+
#define IGNORE_PIN_PA24 1
35+
#define IGNORE_PIN_PA25 1
36+
#define IGNORE_PIN_PA28 1
37+
#define IGNORE_PIN_PB01 1
38+
#define IGNORE_PIN_PB02 1
39+
#define IGNORE_PIN_PB03 1
40+
#define IGNORE_PIN_PB04 1
41+
#define IGNORE_PIN_PB05 1
42+
#define IGNORE_PIN_PB06 1
43+
#define IGNORE_PIN_PB07 1
44+
#define IGNORE_PIN_PB08 1
45+
#define IGNORE_PIN_PB09 1
46+
#define IGNORE_PIN_PB10 1
47+
#define IGNORE_PIN_PB11 1
48+
#define IGNORE_PIN_PB12 1
49+
#define IGNORE_PIN_PB13 1
50+
#define IGNORE_PIN_PB14 1
51+
#define IGNORE_PIN_PB15 1
52+
#define IGNORE_PIN_PB16 1
53+
#define IGNORE_PIN_PB17 1
54+
#define IGNORE_PIN_PB22 1
55+
#define IGNORE_PIN_PB23 1
56+
#define IGNORE_PIN_PB30 1
57+
#define IGNORE_PIN_PB31 1
58+
#define IGNORE_PIN_PB00 1
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
LD_FILE = boards/samd21x18-bootloader.ld
2+
USB_VID = 0xBAB2
3+
USB_PID = 0x1209
4+
USB_PRODUCT = "CatWAN USBStick"
5+
USB_MANUFACTURER = "Electronic Cats"
6+
7+
INTERNAL_FLASH_FILESYSTEM = 1
8+
LONGINT_IMPL = NONE
9+
10+
CHIP_VARIANT = SAMD21E18A
11+
CHIP_FAMILY = samd21
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "shared-bindings/board/__init__.h"
2+
3+
#include "board_busses.h"
4+
5+
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
6+
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA30) },
7+
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA31) },
8+
{ MP_ROM_QSTR(MP_QSTR_RFM9X_D0), MP_ROM_PTR(&pin_PA04) },
9+
{ MP_ROM_QSTR(MP_QSTR_RFM9X_D1), MP_ROM_PTR(&pin_PA23) },
10+
{ MP_ROM_QSTR(MP_QSTR_RFM9X_D2), MP_ROM_PTR(&pin_PA27) },
11+
{ MP_ROM_QSTR(MP_QSTR_RFM9X_D5), MP_ROM_PTR(&pin_PA15) },
12+
{ MP_ROM_QSTR(MP_QSTR_RFM9X_RST), MP_ROM_PTR(&pin_PA16) },
13+
{ MP_ROM_QSTR(MP_QSTR_RFM9X_CS), MP_ROM_PTR(&pin_PA17) },
14+
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA19) },
15+
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA18) },
16+
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA22) },
17+
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
18+
};
19+
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

0 commit comments

Comments
 (0)