Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(devboard): Add support for Seeed Studio XIAO SAMD21 #27

Merged
merged 62 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
24706af
chore(library): Bump version number to 0.4.0
ZZ-Cat Jul 16, 2023
c65db39
feat(devboard): Initial support for Seeed XIAO
ZZ-Cat Jul 16, 2023
1e3b8dd
docs(readme): Add Seeed Studio XIAO to the list of compatible develop…
ZZ-Cat Jul 16, 2023
d28fb63
fix: Fix typos in `CompatibilityTable.h` & `CRSFforArduino.cpp`
ZZ-Cat Jul 17, 2023
fdc7a0b
chore(compatibility table): Exit initialisation, if the target devboa…
ZZ-Cat Jul 17, 2023
8743a21
feat(hal): Add a validitiy check on the SERCOM
ZZ-Cat Jul 17, 2023
105c0e6
feat(library): Add various debug messages.
ZZ-Cat Jul 17, 2023
5743a41
refactor(arduino): Defer error handling to user sketch layer.
ZZ-Cat Jul 17, 2023
37b727d
refactor(platformio): Defer error handling to user sketch layer.
ZZ-Cat Jul 17, 2023
436459a
refactor(compatibility table): Use USB VIDs & PIDs to detect compatib…
ZZ-Cat Jul 19, 2023
3e45052
chore(library): Bump version number to 0.4.0
ZZ-Cat Jul 16, 2023
4f538d4
feat(devboard): Initial support for Seeed XIAO
ZZ-Cat Jul 16, 2023
82c6f7a
docs(readme): Add Seeed Studio XIAO to the list of compatible develop…
ZZ-Cat Jul 16, 2023
9c72b75
fix: Fix typos in `CompatibilityTable.h` & `CRSFforArduino.cpp`
ZZ-Cat Jul 17, 2023
efbe2d0
chore(compatibility table): Exit initialisation, if the target devboa…
ZZ-Cat Jul 17, 2023
b0b3fc9
feat(hal): Add a validitiy check on the SERCOM
ZZ-Cat Jul 17, 2023
000f188
feat(library): Add various debug messages.
ZZ-Cat Jul 17, 2023
b151fa7
refactor(arduino): Defer error handling to user sketch layer.
ZZ-Cat Jul 17, 2023
0fcaa0c
refactor(platformio): Defer error handling to user sketch layer.
ZZ-Cat Jul 17, 2023
6e401cd
Merge branch 'Testing-SeeedXIAO-Support' of https://github.com/ZZ-Cat…
ZZ-Cat Jul 19, 2023
b88510e
chore(library): Cleanup rebase botches
ZZ-Cat Jul 19, 2023
9c6e75f
refactor(crsf): Deprecate existing unpacking of RC Channels Data
ZZ-Cat Jul 21, 2023
6b58bd5
refactor(crsf): Use Packed RC Channels Data
ZZ-Cat Jul 21, 2023
707e164
chore(crsf): Clean up deprecated code
ZZ-Cat Jul 21, 2023
e0d5973
refactor(hal): Remove changing data order
ZZ-Cat Jul 21, 2023
869a885
chore(hal): Move `getSercom()` function inside the DMA initialisation
ZZ-Cat Jul 21, 2023
d34688d
docs(readme): Remove paragraph regardin changing the UART data order
ZZ-Cat Jul 21, 2023
f954c00
docs(readme): Add a full list of minimum requirements
ZZ-Cat Jul 21, 2023
21bdbf0
docs(readme): Add a paragraph regarding compatibility issues for devb…
ZZ-Cat Jul 21, 2023
1407e13
chore(library): Fix formatting errors
ZZ-Cat Jul 21, 2023
bba5230
chore(library): Bump version number to 0.3.4
ZZ-Cat Jul 21, 2023
d39bba0
Merge pull request #30 from ZZ-Cat:testing-packedRCchannels
ZZ-Cat Jul 21, 2023
17bc536
ci(github): Add Devboard Compatibility Request form
ZZ-Cat Jul 21, 2023
08878d4
ci(github): Rename devboard-request.yml
ZZ-Cat Jul 21, 2023
49e2b5b
ci(github): Fix typo in devboard-request.yml
ZZ-Cat Jul 21, 2023
d12a6b0
ci(github): Remove `validations` key
ZZ-Cat Jul 21, 2023
39154ce
ci(github): Reinstate `validations` key
ZZ-Cat Jul 21, 2023
aae1f15
ci(github): Move `validations` out of `attributes` block
ZZ-Cat Jul 21, 2023
95fee0e
ci(github): Add an Issue Template config.
ZZ-Cat Jul 21, 2023
a0e19ce
ci(github): Rephrase the `devboard-request` description.
ZZ-Cat Jul 21, 2023
b70f9dc
ci(issue templates): Replace outdated bug report template with new bu…
ZZ-Cat Jul 21, 2023
f1e1531
ci(issue templates): Fix typo in `bug-report.yml`
ZZ-Cat Jul 21, 2023
bf42253
ci(issue templates): Resolve `Name must be unique` error in `bug-repo…
ZZ-Cat Jul 21, 2023
421c4ad
ci(issue templates): Add `Pending 📌` label to `bug-report.yml`
ZZ-Cat Jul 21, 2023
fc21138
ci(github actions): Increase number of days before auto-close to 60 days
ZZ-Cat Jul 21, 2023
dfcb94b
ci(github actions): Update exempt Issues & Pull Request labels
ZZ-Cat Jul 21, 2023
35f61c7
ci(issue templates): Replace outdated feature request template with a…
ZZ-Cat Jul 21, 2023
c3057dc
chore(issue templates): Remove deprecated issue templates
ZZ-Cat Jul 22, 2023
a8fd898
chore(library): Bump version number to 0.4.0
ZZ-Cat Jul 16, 2023
8c043d2
feat(devboard): Initial support for Seeed XIAO
ZZ-Cat Jul 16, 2023
e940985
docs(readme): Add Seeed Studio XIAO to the list of compatible develop…
ZZ-Cat Jul 16, 2023
b0ff0a1
fix: Fix typos in `CompatibilityTable.h` & `CRSFforArduino.cpp`
ZZ-Cat Jul 17, 2023
1383c41
chore(compatibility table): Exit initialisation, if the target devboa…
ZZ-Cat Jul 17, 2023
c39568e
feat(library): Add various debug messages.
ZZ-Cat Jul 17, 2023
564f729
refactor(arduino): Defer error handling to user sketch layer.
ZZ-Cat Jul 17, 2023
99acaac
refactor(platformio): Defer error handling to user sketch layer.
ZZ-Cat Jul 17, 2023
05b8048
feat(devboard): Initial support for Seeed XIAO
ZZ-Cat Jul 16, 2023
b3b33fe
fix: Fix typos in `CompatibilityTable.h` & `CRSFforArduino.cpp`
ZZ-Cat Jul 17, 2023
5718ae3
chore(library): Cleanup rebase botches
ZZ-Cat Jul 19, 2023
2dc2c0d
Merge branch 'Testing-SeeedXIAO-Support' of https://github.com/ZZ-Cat…
ZZ-Cat Jul 22, 2023
ffd25e1
chore(library): Fix minor rebase errors
ZZ-Cat Jul 22, 2023
23fb987
chore(issue templates): Add Seeed Studio XIAO SAMD21 as an option to …
ZZ-Cat Jul 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ While CRSF for Arduino is primarily developed on the Adafruit Metro M4 Express,
- MKR Zero
- Arduino Nano 33 IoT
- Arduino Zero
- Seeed Studio XIAO SAMD21
- SAMD51 based boards:
- Adafruit Feather M4 Express
- Adafruit Grand Central M4
Expand Down Expand Up @@ -251,6 +252,7 @@ Here are some examples:
- These have an equivalent "breadboard-friendly" form factor that is similar to the Arduio Micro & the Arduino Nano:
- Adafruit Feather M0 (all variants, including the Feather M0 Express)
- Adafruit Feather M4 Express
- Seeed Studio XIAO SAMD21
- These have the "Arduino R3" form factor - The same shape as the Arduino UNO:
- Adafruit:
- Metro M0 Express
Expand All @@ -276,6 +278,10 @@ For wiring, here is how you do it:
- T (or Tx) on your receiver goes to ►Rx/Pin0 on your development board. This step can catch you out, if you're not careful.
- R (or Rx) on your reciever goes to ◄Tx/Pin1 on your development board. This step can catch you out, if you're not careful.

**NB:** Some development boards (especially smaller ones) may not route the primary UART port to the default 0 & 1 pins, as these pins may be used for other purposes or they simply are not physically available to you on the device.
As a workaround, CRSF for Arduino automatically selects the closest available pins that has a suitable UART port.
You _must_ refer to your development board's documentation to determine where your default Tx & Rx pins are. These are the pins that CRSF for Arduino will use.

## Telemetry

Currently, there is no telemetry feedback from the host microcontroller's side... _yet!_
Expand Down
4 changes: 2 additions & 2 deletions examples/channels/channels.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @file channels.ino
* @author Cassandra "ZZ Cat" Robinson ([email protected])
* @brief This example sketch shows how to receive RC channels from a CRSF receiver using the CRSF for Arduino library.
* @version 0.3.2
* @date 2023-06-03
* @version 0.4.0
* @date 2023-07-17
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=CRSFforArduino
version=0.3.2
version=0.4.0
author=Cassandra Robinson <[email protected]>
maintainer=Cassandra Robinson <[email protected]>
sentence=An Arduino Library for communicating with ExpressLRS receivers.
Expand Down
4 changes: 4 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ lib_deps = ${common.lib_deps}
board = mkrzero
lib_deps = ${common.lib_deps}

[env:seeed_xiao]
board = seeed_xiao
lib_deps = ${common.lib_deps}

[env:zero]
board = zero
lib_deps = ${common.lib_deps}
Expand Down
4 changes: 2 additions & 2 deletions src/CRSFforArduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @file CRSFforArduino.h
* @author Cassandra "ZZ Cat" Robinson ([email protected])
* @brief Top level header for CRSF for Arduino, to help with Arduino IDE compatibility.
* @version 0.3.2
* @date 2023-06-03
* @version 0.4.0
* @date 2023-07-17
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down
8 changes: 6 additions & 2 deletions src/lib/CRSFforArduino/CRSFforArduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @file CRSFforArduino.cpp
* @author Cassandra "ZZ Cat" Robinson ([email protected])
* @brief CRSF for Arduino facilitates the use of ExpressLRS RC receivers in Arduino projects.
* @version 0.3.2
* @date 2023-06-03
* @version 0.4.0
* @date 2023-07-17
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down Expand Up @@ -352,6 +352,10 @@ Sercom *CRSFforArduino::_getSercom()
defined(ARDUINO_SAMD_NANO_33_IOT)
sercom = SERCOM5;

/* Seeed XIAO. */
#elif defined(SEEED_XIAO_M0)
sercom = SERCOM4;

/* Arduino Zero. */
#elif defined(ARDUINO_SAMD_ZERO)
sercom = SERCOM0;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/CRSFforArduino/CRSFforArduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @file CRSFforArduino.h
* @author Cassandra "ZZ Cat" Robinson ([email protected])
* @brief CRSF for Arduino facilitates the use of ExpressLRS RC receivers in Arduino projects.
* @version 0.3.2
* @date 2023-06-03
* @version 0.4.0
* @date 2023-07-17
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down
6 changes: 4 additions & 2 deletions src/lib/CompatibilityTable/CompatibilityTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @file CompatibilityTable.cpp
* @author Cassandra "ZZ Cat" Robinson ([email protected])
* @brief Compatibility Table is used to determine if the current device is compatible with CRSF for Arduino.
* @version 0.3.2
* @date 2023-06-03
* @version 0.4.0
* @date 2023-07-17
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down Expand Up @@ -73,6 +73,8 @@ CompatibilityTable::CompatibilityTable()
device.type.devboard = DEVBOARD_ARDUINO_MKRZERO;
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
device.type.devboard = DEVBOARD_ARDUINO_NANO_33_IOT;
#elif defined(SEEED_XIAO_M0)
device.type.devboard = DEVBOARD_SEEEDSTUDIO_XIAO_M0;
#elif defined(ARDUINO_SAMD_ZERO)
device.type.devboard = DEVBOARD_ARDUINO_ZERO;
#else
Expand Down
10 changes: 7 additions & 3 deletions src/lib/CompatibilityTable/CompatibilityTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @file CompatibilityTable.h
* @author Cassandra "ZZ Cat" Robinson ([email protected])
* @brief Compatibility Table is used to determine if the current device is compatible with CRSF for Arduino.
* @version 0.3.2
* @date 2023-06-03
* @version 0.4.0
* @date 2023-07-17
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down Expand Up @@ -73,6 +73,9 @@ class CompatibilityTable
DEVBOARD_ARDUINO_NANO_33_IOT,
DEVBOARD_ARDUINO_ZERO,

// Seeed Studio SAMD21 boards.
DEVBOARD_SEEEDSTUDIO_XIAO_M0,

DEVBOARD_COUNT
} __ct_devboards_t;

Expand Down Expand Up @@ -112,7 +115,8 @@ class CompatibilityTable
"Arduino MKRWIFI1010",
"Arduino MKRZERO",
"Arduino Nano 33 IoT",
"Arduino Zero"};
"Arduino Zero",
"Seeed Studio Xiao M0"};
};

// CompatibilityTable CT = CompatibilityTable();
2 changes: 1 addition & 1 deletion src/library.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json",
"name": "CRSFforArduino",
"version": "0.3.2",
"version": "0.4.0",
"description": "Arduino library for Crossfire protocol",
"keywords": [
"adafruit",
Expand Down
4 changes: 2 additions & 2 deletions src/src/main_rc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @file main_rc.cpp
* @author Cassandra "ZZ Cat" Robinson ([email protected])
* @brief This file demonstrates the full capabilities of CRSF for Arduino.
* @version 0.3.2
* @date 2023-06-03
* @version 0.4.0
* @date 2023-07-17
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down