forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rp2/boards/SPARKFUN_XRP_CONTROLLER_BETA: Add SparkFun XRP Controller.
Signed-off-by: Dryw Wade <[email protected]>
- Loading branch information
1 parent
9939b6c
commit cad62c2
Showing
5 changed files
with
136 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"deploy": [ | ||
"../deploy.md" | ||
], | ||
"docs": "", | ||
"features": [ | ||
"BLE", | ||
"Dual-core", | ||
"External Flash", | ||
"IMU", | ||
"JST-SH", | ||
"USB", | ||
"WiFi" | ||
], | ||
"images": [ | ||
"22727-_01.jpg" | ||
], | ||
"mcu": "rp2040", | ||
"product": "XRP Controller (Beta)", | ||
"thumbnail": "", | ||
"url": "https://www.sparkfun.com/sparkfun-experiential-robotics-platform-xrp-controller.html", | ||
"vendor": "Sparkfun" | ||
} |
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,6 @@ | ||
include("$(PORT_DIR)/boards/manifest.py") | ||
|
||
require("bundle-networking") | ||
|
||
# Bluetooth | ||
require("aioble") |
14 changes: 14 additions & 0 deletions
14
ports/rp2/boards/SPARKFUN_XRP_CONTROLLER_BETA/mpconfigboard.cmake
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,14 @@ | ||
# cmake file for SparkFun XRP Controller (Beta) | ||
|
||
set(PICO_BOARD "pico_w") | ||
|
||
set(MICROPY_PY_LWIP ON) | ||
set(MICROPY_PY_NETWORK_CYW43 ON) | ||
|
||
# Bluetooth | ||
set(MICROPY_PY_BLUETOOTH ON) | ||
set(MICROPY_BLUETOOTH_BTSTACK ON) | ||
set(MICROPY_PY_BLUETOOTH_CYW43 ON) | ||
|
||
# Board specific version of the frozen manifest | ||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) |
28 changes: 28 additions & 0 deletions
28
ports/rp2/boards/SPARKFUN_XRP_CONTROLLER_BETA/mpconfigboard.h
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,28 @@ | ||
// Board and hardware specific configuration | ||
#define MICROPY_HW_BOARD_NAME "SparkFun XRP Controller (Beta)" | ||
|
||
// todo: We need something to check our binary size | ||
#define MICROPY_HW_FLASH_STORAGE_BYTES (848 * 1024) | ||
|
||
// Enable networking. | ||
#define MICROPY_PY_NETWORK 1 | ||
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "XRP" | ||
|
||
// CYW43 driver configuration. | ||
#define CYW43_USE_SPI (1) | ||
#define CYW43_LWIP (1) | ||
#define CYW43_GPIO (1) | ||
#define CYW43_SPI_PIO (1) | ||
|
||
// For debugging mbedtls - also set | ||
// Debug level (0-4) 1=warning, 2=info, 3=debug, 4=verbose | ||
// #define MODUSSL_MBEDTLS_DEBUG_LEVEL 1 | ||
|
||
#define MICROPY_HW_PIN_EXT_COUNT CYW43_WL_GPIO_COUNT | ||
|
||
// If this returns true for a pin then its irq will not be disabled on a soft reboot | ||
int mp_hal_is_pin_reserved(int n); | ||
#define MICROPY_HW_PIN_RESERVED(i) mp_hal_is_pin_reserved(i) | ||
|
||
#define MICROPY_HW_I2C1_SDA (18) | ||
#define MICROPY_HW_I2C1_SCL (19) |
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,65 @@ | ||
# XRP default pin names | ||
MOTOR_L_IN_1,GPIO6 | ||
MOTOR_L_IN_2,GPIO7 | ||
MOTOR_R_IN_1,GPIO14 | ||
MOTOR_R_IN_2,GPIO15 | ||
MOTOR_3_IN_1,GPIO2 | ||
MOTOR_3_IN_2,GPIO3 | ||
MOTOR_4_IN_1,GPIO10 | ||
MOTOR_4_IN_2,GPIO11 | ||
MOTOR_L_ENCODER_A,GPIO4 | ||
MOTOR_L_ENCODER_B,GPIO5 | ||
MOTOR_R_ENCODER_A,GPIO12 | ||
MOTOR_R_ENCODER_B,GPIO13 | ||
MOTOR_3_ENCODER_A,GPIO0 | ||
MOTOR_3_ENCODER_B,GPIO1 | ||
MOTOR_4_ENCODER_A,GPIO8 | ||
MOTOR_4_ENCODER_B,GPIO9 | ||
SERVO_1,GPIO16 | ||
SERVO_2,GPIO17 | ||
I2C_SDA_1,GPIO18 | ||
I2C_SCL_1,GPIO19 | ||
DISTANCE_TRIGGER,GPIO20 | ||
DISTANCE_ECHO,GPIO21 | ||
LINE_L,GPIO26 | ||
LINE_R,GPIO27 | ||
BOARD_VIN_MEASURE,GPIO28 | ||
BOARD_USER_BUTTON,GPIO22 | ||
BOARD_LED,EXT_GPIO0 | ||
|
||
# XRP alternate pin names | ||
ML_IN_1,GPIO6 | ||
ML_IN_2,GPIO7 | ||
MR_IN_1,GPIO14 | ||
MR_IN_2,GPIO15 | ||
M3_IN_1,GPIO2 | ||
M3_IN_2,GPIO3 | ||
M4_IN_1,GPIO10 | ||
M4_IN_2,GPIO11 | ||
ML_ENC_A,GPIO4 | ||
ML_ENC_B,GPIO5 | ||
MR_ENC_A,GPIO12 | ||
MR_ENC_B,GPIO13 | ||
M3_ENC_A,GPIO0 | ||
M3_ENC_B,GPIO1 | ||
M4_ENC_A,GPIO8 | ||
M4_ENC_B,GPIO9 | ||
S1,GPIO16 | ||
S2,GPIO17 | ||
SDA_1,GPIO18 | ||
SCL_1,GPIO19 | ||
RANGE_TRIGGER,GPIO20 | ||
RANGE_ECHO,GPIO21 | ||
REFLECTANCE_L,GPIO26 | ||
REFLECTANCE_R,GPIO27 | ||
BRD_VIN,GPIO28 | ||
BRD_USR_BTN,GPIO22 | ||
BRD_LED,EXT_GPIO0 | ||
|
||
# LED default names | ||
LED,EXT_GPIO0 | ||
|
||
# Radio GPIO pins | ||
WL_GPIO0,EXT_GPIO0 | ||
WL_GPIO1,EXT_GPIO1 | ||
WL_GPIO2,EXT_GPIO2 |