rp2/boards/NULLBITS_BIT_C_PRO: Add Bit-C PRO board.
This commit is contained in:
parent
67fac4ebc5
commit
be420bf9bb
17
ports/rp2/boards/NULLBITS_BIT_C_PRO/README.md
Normal file
17
ports/rp2/boards/NULLBITS_BIT_C_PRO/README.md
Normal file
@ -0,0 +1,17 @@
|
||||
# nullbits Bit-C PRO
|
||||
|
||||
The nullbits Bit-C PRO Board is based on the Raspberry Pi RP2040, and comes in the Arduino Pro Micro footprint.
|
||||
|
||||
|
||||
## Board-specific modules
|
||||
|
||||
The `board` module contains definitions for the onboard RGB LED.
|
||||
|
||||
Example:
|
||||
|
||||
```python
|
||||
>>> import board
|
||||
>>> board.led_red.on()
|
||||
>>> board.led_green.on()
|
||||
>>> board.led_blue.on()
|
||||
```
|
20
ports/rp2/boards/NULLBITS_BIT_C_PRO/board.json
Normal file
20
ports/rp2/boards/NULLBITS_BIT_C_PRO/board.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"deploy": [
|
||||
"../deploy.md"
|
||||
],
|
||||
"docs": "",
|
||||
"features": [
|
||||
"Breadboard Friendly",
|
||||
"RGB LED",
|
||||
"USB-C",
|
||||
"SPI Flash"
|
||||
],
|
||||
"images": [
|
||||
"nullbits_bit_c_pro.jpg"
|
||||
],
|
||||
"mcu": "rp2040",
|
||||
"product": "Bit-C PRO",
|
||||
"thumbnail": "",
|
||||
"url": "https://nullbits.co/bit-c-pro",
|
||||
"vendor": "nullbits"
|
||||
}
|
7
ports/rp2/boards/NULLBITS_BIT_C_PRO/board.py
Normal file
7
ports/rp2/boards/NULLBITS_BIT_C_PRO/board.py
Normal file
@ -0,0 +1,7 @@
|
||||
from machine import Pin, Signal
|
||||
|
||||
led_red = Signal("LED_RED", Pin.OUT, invert=True, value=0)
|
||||
led_green = Signal("LED_GREEN", Pin.OUT, invert=True, value=0)
|
||||
led_blue = Signal("LED_BLUE", Pin.OUT, invert=True, value=0)
|
||||
|
||||
del Pin
|
2
ports/rp2/boards/NULLBITS_BIT_C_PRO/manifest.py
Normal file
2
ports/rp2/boards/NULLBITS_BIT_C_PRO/manifest.py
Normal file
@ -0,0 +1,2 @@
|
||||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
module("board.py")
|
10
ports/rp2/boards/NULLBITS_BIT_C_PRO/mpconfigboard.cmake
Normal file
10
ports/rp2/boards/NULLBITS_BIT_C_PRO/mpconfigboard.cmake
Normal file
@ -0,0 +1,10 @@
|
||||
# cmake file for nullbits Bit-C PRO
|
||||
|
||||
# The Bit-C PRO is not yet in upstream pico-sdk, so define it here
|
||||
# See also: https://github.com/raspberrypi/pico-sdk/tree/master/src/boards/include/boards
|
||||
list(APPEND PICO_BOARD_HEADER_DIRS ${MICROPY_BOARD_DIR})
|
||||
|
||||
set(PICO_BOARD "nullbits_bit_c_pro")
|
||||
|
||||
# Freeze board.py
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
9
ports/rp2/boards/NULLBITS_BIT_C_PRO/mpconfigboard.h
Normal file
9
ports/rp2/boards/NULLBITS_BIT_C_PRO/mpconfigboard.h
Normal file
@ -0,0 +1,9 @@
|
||||
// https://nullbits.co/bit-c-pro
|
||||
|
||||
#define MICROPY_HW_BOARD_NAME "nullbits Bit-C PRO"
|
||||
#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - (1 * 512 * 1024)) // 512K reserved
|
||||
|
||||
// RGB LED, active low
|
||||
// Red LED 16
|
||||
// Green LED 17
|
||||
// Blue LED 18
|
96
ports/rp2/boards/NULLBITS_BIT_C_PRO/nullbits_bit_c_pro.h
Normal file
96
ports/rp2/boards/NULLBITS_BIT_C_PRO/nullbits_bit_c_pro.h
Normal file
@ -0,0 +1,96 @@
|
||||
// Board definition for the nullbits Bit-C PRO
|
||||
|
||||
#ifndef _BOARDS_NULLBITS_BIT_C_PRO_H
|
||||
#define _BOARDS_NULLBITS_BIT_C_PRO_H
|
||||
|
||||
// For board detection
|
||||
#define NULLBITS_BIT_C_PRO
|
||||
|
||||
// On some samples, the xosc can take longer to stabilize than is usual
|
||||
#ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER
|
||||
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64
|
||||
#endif
|
||||
|
||||
// --- BOARD SPECIFIC ---
|
||||
#define BIT_C_PRO_LED_R_PIN 16
|
||||
#define BIT_C_PRO_LED_G_PIN 17
|
||||
#define BIT_C_PRO_LED_B_PIN 18
|
||||
|
||||
// ------------- UART -------------//
|
||||
#ifndef PICO_DEFAULT_UART
|
||||
#define PICO_DEFAULT_UART 0
|
||||
#endif
|
||||
|
||||
#ifndef PICO_DEFAULT_UART_TX_PIN
|
||||
#define PICO_DEFAULT_UART_TX_PIN 0
|
||||
#endif
|
||||
|
||||
#ifndef PICO_DEFAULT_UART_RX_PIN
|
||||
#define PICO_DEFAULT_UART_RX_PIN 1
|
||||
#endif
|
||||
|
||||
// --- LED ---
|
||||
// Set the default LED to the Bit-C PRO's B led
|
||||
#ifndef PICO_DEFAULT_LED_PIN
|
||||
#define PICO_DEFAULT_LED_PIN BIT_C_PRO_LED_B_PIN
|
||||
#endif
|
||||
|
||||
#ifndef PICO_DEFAULT_LED_PIN_INVERTED
|
||||
#define PICO_DEFAULT_LED_PIN_INVERTED 1
|
||||
#endif
|
||||
// no PICO_DEFAULT_WS2812_PIN
|
||||
|
||||
// ------------- I2C -------------//
|
||||
#ifndef PICO_DEFAULT_I2C
|
||||
#define PICO_DEFAULT_I2C 0
|
||||
#endif
|
||||
|
||||
#ifndef PICO_DEFAULT_I2C_SDA_PIN
|
||||
#define PICO_DEFAULT_I2C_SDA_PIN 2
|
||||
#endif
|
||||
|
||||
#ifndef PICO_DEFAULT_I2C_SCL_PIN
|
||||
#define PICO_DEFAULT_I2C_SCL_PIN 3
|
||||
#endif
|
||||
|
||||
// ------------- SPI -------------//
|
||||
#ifndef PICO_DEFAULT_SPI
|
||||
#define PICO_DEFAULT_SPI 0
|
||||
#endif
|
||||
|
||||
#ifndef PICO_DEFAULT_SPI_TX_PIN
|
||||
#define PICO_DEFAULT_SPI_TX_PIN 23
|
||||
#endif
|
||||
|
||||
#ifndef PICO_DEFAULT_SPI_RX_PIN
|
||||
#define PICO_DEFAULT_SPI_RX_PIN 20
|
||||
#endif
|
||||
|
||||
#ifndef PICO_DEFAULT_SPI_SCK_PIN
|
||||
#define PICO_DEFAULT_SPI_SCK_PIN 22
|
||||
#endif
|
||||
|
||||
#ifndef PICO_DEFAULT_SPI_CSN_PIN
|
||||
#define PICO_DEFAULT_SPI_CSN_PIN 21
|
||||
#endif
|
||||
|
||||
// ------------- FLASH -------------//
|
||||
|
||||
// Best performance/compatibility with selected flash
|
||||
#define PICO_BOOT_STAGE2_CHOOSE_W25X10CL 1
|
||||
|
||||
#ifndef PICO_FLASH_SPI_CLKDIV
|
||||
#define PICO_FLASH_SPI_CLKDIV 2
|
||||
#endif
|
||||
|
||||
// Bit-C PRO has 4MB SPI flash
|
||||
#ifndef PICO_FLASH_SIZE_BYTES
|
||||
#define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024)
|
||||
#endif
|
||||
|
||||
// All boards have B1+ RP2040
|
||||
#ifndef PICO_RP2040_B0_SUPPORTED
|
||||
#define PICO_RP2040_B0_SUPPORTED 0
|
||||
#endif
|
||||
|
||||
#endif
|
4
ports/rp2/boards/NULLBITS_BIT_C_PRO/pins.csv
Normal file
4
ports/rp2/boards/NULLBITS_BIT_C_PRO/pins.csv
Normal file
@ -0,0 +1,4 @@
|
||||
LED,GPIO16
|
||||
LED_RED,GPIO16
|
||||
LED_GREEN,GPIO17
|
||||
LED_BLUE,GPIO18
|
|
Loading…
Reference in New Issue
Block a user