-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(devboard): Add support for RP2040 (#72)
- Loading branch information
Showing
26 changed files
with
63 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief Example of how to read flight modes from a receiver. | ||
* @version 1.0.0 | ||
* @date 2024-2-6 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief Example of how to read link statistics from a receiver. | ||
* @version 1.0.0 | ||
* @date 2024-2-6 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief This is the main development file for CRSF for Arduino. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief Example of how to read rc channels from a receiver. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief Example of how to send telemetry back to your RC handset using CRSF for Arduino. | ||
* @version 1.0.0 | ||
* @date 2024-2-6 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ core_dir = .pio/core | |
extra_configs = | ||
targets/common.ini | ||
targets/unified_esp32.ini | ||
targets/unified_rp2040.ini | ||
targets/unified_samd21.ini | ||
targets/unified_samd51.ini | ||
targets/unified_teensy3x.ini | ||
|
@@ -25,14 +26,5 @@ test_dir = | |
|
||
; [env:development] | ||
; board = adafruit_metro_m4 | ||
; build_src_filter = | ||
; +<../examples/platformio/main.cpp> | ||
; +<hal/CompatibilityTable/*.cpp> | ||
; +<SerialReceiver/*.cpp> | ||
; +<SerialReceiver/CRC/*.cpp> | ||
; +<SerialReceiver/CRSF/*.cpp> | ||
; +<SerialReceiver/SerialBuffer/*.cpp> | ||
; +<SerialReceiver/Telemetry/*.cpp> | ||
; +<*.cpp> | ||
; build_type = debug | ||
; platform = [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief This is the configuration file for CRSF for Arduino. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
@@ -37,7 +37,7 @@ namespace crsfForArduinoConfig | |
Versioning is done using Semantic Versioning 2.0.0. | ||
See https://semver.org/ for more information. */ | ||
#define CRSFFORARDUINO_VERSION "1.0.0" | ||
#define CRSFFORARDUINO_VERSION_DATE "2024-2-7" | ||
#define CRSFFORARDUINO_VERSION_DATE "2024-2-9" | ||
#define CRSFFORARDUINO_VERSION_MAJOR 1 | ||
#define CRSFFORARDUINO_VERSION_MINOR 0 | ||
#define CRSFFORARDUINO_VERSION_PATCH 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief A generic CRC8 implementation for the CRSF for Arduino library. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief A generic CRC8 implementation for the CRSF for Arduino library. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief This decodes CRSF frames from a serial port. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief This decodes CRSF frames from a serial port. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief This file contains enums and structs for the CRSF protocol. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief A generic serial buffer for the CRSF for Arduino library. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief A generic serial buffer for the CRSF for Arduino library. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief The Serial Receiver layer for the CRSF for Arduino library. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief The Serial Receiver layer for the CRSF for Arduino library. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief This encodes data into CRSF telemetry frames for transmission to the RC handset. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief This encodes data into CRSF telemetry frames for transmission to the RC handset. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief The Compatibility Table determines if the target development board is compatible with CRSF for Arduino. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
@@ -95,6 +95,22 @@ namespace hal | |
device.type.devboard = DEVBOARD_IS_PERMISSIVELY_INCOMPATIBLE_UNKNOWN_BOARD; | ||
#endif | ||
|
||
// Raspberry Pi RP2040 Architecture | ||
#elif defined(ARDUINO_ARCH_RP2040) | ||
|
||
// Arduino Nano RP2040 Connect | ||
#if defined(ARDUINO_NANO_RP2040_CONNECT) | ||
device.type.devboard = DEVBOARD_ARDUINO_NANO_RP2040_CONNECT; | ||
|
||
// Raspberry Pi Pico | ||
#elif defined(ARDUINO_RASPBERRY_PI_PICO) | ||
device.type.devboard = DEVBOARD_RASPBERRYPI_PICO; | ||
#else | ||
// The architecture and chip is known, but the board is not. | ||
#warning "The target board is unknown. Please enable CRSF_DEBUG_ENABLED and CRSF_DEBUG_ENABLE_COMPATIBILITY_TABLE_OUTPUT in CFA_Config.hpp for more information." | ||
device.type.devboard = DEVBOARD_IS_PERMISSIVELY_INCOMPATIBLE_UNKNOWN_BOARD; | ||
#endif | ||
|
||
// Arduino SAMD Architecture | ||
#elif defined(ARDUINO_ARCH_SAMD) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Cassandra "ZZ Cat" Robinson ([email protected]) | ||
* @brief The Compatibility Table determines if the target development board is compatible with CRSF for Arduino. | ||
* @version 1.0.0 | ||
* @date 2024-2-7 | ||
* @date 2024-2-9 | ||
* | ||
* @copyright Copyright (c) 2024, Cassandra "ZZ Cat" Robinson. All rights reserved. | ||
* | ||
|
@@ -82,6 +82,9 @@ namespace hal | |
// Arduino ESP32 boards. | ||
DEVBOARD_ARDUINO_NANO_ESP32, | ||
|
||
// Arduino RP2040 boards. | ||
DEVBOARD_ARDUINO_NANO_RP2040_CONNECT, | ||
|
||
// Arduino SAMD21 boards. | ||
DEVBOARD_ARDUINO_MKR1000, | ||
DEVBOARD_ARDUINO_MKRFOX1200, | ||
|
@@ -99,6 +102,9 @@ namespace hal | |
DEVBOARD_ESPRESSIF_ESP32C3_DEVKIT, | ||
DEVBOARD_ESPRESSIF_ESP32S3_DEVKIT, | ||
|
||
// Raspberry Pi RP2040 boards. | ||
DEVBOARD_RASPBERRYPI_PICO, | ||
|
||
// Seeed Studio boards. | ||
DEVBOARD_SEEEDSTUDIO_XIAO_ESP32C3, | ||
DEVBOARD_SEEEDSTUDIO_XIAO_ESP32S3, | ||
|
@@ -160,6 +166,7 @@ namespace hal | |
"Adafruit Metro M4 Express", | ||
"Adafruit Feather M4 CAN", | ||
"Arduino Nano ESP32", | ||
"Arduino Nano RP2040 Connect", | ||
"Arduino MKR1000", | ||
"Arduino MKRFOX1200", | ||
"Arduino MKRGSM1400", | ||
|
@@ -173,6 +180,7 @@ namespace hal | |
"Arduino Zero", | ||
"Espressif ESP32-C3 DevKit", | ||
"Espressif ESP32-S3 DevKit", | ||
"Raspberry Pi Pico", | ||
"Seeed Studio Xiao ESP32-C3", | ||
"Seeed Studio Xiao ESP32-S3", | ||
"Seeed Studio Xiao SAMD21", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ build_flags = | |
[env_common_esp32] | ||
platform = [email protected] | ||
|
||
[env_common_rp2040] | ||
platform = [email protected] | ||
|
||
[env_common_samd21] | ||
platform = [email protected] | ||
|
||
|
@@ -28,12 +31,7 @@ platform = [email protected] | |
framework = arduino | ||
build_src_filter = | ||
+<../examples/platformio/main.cpp> | ||
+<hal/CompatibilityTable/*.cpp> | ||
+<SerialReceiver/*.cpp> | ||
+<SerialReceiver/CRC/*.cpp> | ||
+<SerialReceiver/CRSF/*.cpp> | ||
+<SerialReceiver/SerialBuffer/*.cpp> | ||
+<SerialReceiver/Telemetry/*.cpp> | ||
+<*/*/*.cpp> | ||
+<*.cpp> | ||
build_unflags = | ||
-Os | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[env:arduino_nano_rp2040_connect] | ||
extends = env_common_rp2040 | ||
board = nanorp2040connect | ||
|
||
[env:raspberrypi_pico_rp2040] | ||
extends = env_common_rp2040 | ||
board = pico |