Skip to content

Commit 635d322

Browse files
Add bluemicro840 board
1 parent ee90bde commit 635d322

File tree

3 files changed

+88
-0
lines changed

3 files changed

+88
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ endif
528528
@$(MD5SUM) test.hex
529529
$(TINYGO) build -size short -o test.hex -target=pca10059 examples/blinky2
530530
@$(MD5SUM) test.hex
531+
$(TINYGO) build -size short -o test.hex -target=bluemicro840 examples/blinky2
532+
@$(MD5SUM) test.hex
531533
$(TINYGO) build -size short -o test.hex -target=itsybitsy-m0 examples/blinky1
532534
@$(MD5SUM) test.hex
533535
$(TINYGO) build -size short -o test.hex -target=feather-m0 examples/blinky1

src/machine/board_bluemicro840.go

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
//go:build bluemicro840
2+
3+
package machine
4+
5+
const HasLowFrequencyCrystal = true
6+
7+
// GPIO Pins
8+
const (
9+
D006 = P0_06
10+
D008 = P0_08
11+
D015 = P0_15
12+
D017 = P0_17
13+
D020 = P0_20
14+
D013 = P0_13
15+
D024 = P0_24
16+
D009 = P0_09
17+
D010 = P0_10
18+
D106 = P1_06
19+
20+
D031 = P0_31 // AIN7; P0.31 (AIN7) is used to read the voltage of the battery via ADC. It can’t be used for any other function.
21+
D012 = P0_12 // VCC 3.3V; P0.12 on VCC shuts off the power to VCC when you set it to high; This saves on battery immensely for LEDs of all kinds that eat power even when off
22+
23+
D030 = P0_30
24+
D026 = P0_26
25+
D029 = P0_29
26+
D002 = P0_02
27+
D113 = P1_13
28+
D003 = P0_03
29+
D028 = P0_28
30+
D111 = P1_11
31+
)
32+
33+
// Analog Pins
34+
const (
35+
AIN0 = P0_02
36+
AIN1 = P0_03
37+
AIN2 = P0_04 // Not Connected
38+
AIN3 = P0_05 // Not Connected
39+
AIN4 = P0_28
40+
AIN5 = P0_29
41+
AIN6 = P0_30
42+
AIN7 = P0_31 // Battery
43+
)
44+
45+
const (
46+
LED1 Pin = P1_04 // Red LED
47+
LED2 Pin = P1_10 // Blue LED
48+
LED Pin = LED1
49+
)
50+
51+
// UART0 pins (logical UART1) - Maps to same location as Pro Micro
52+
const (
53+
UART_RX_PIN = P0_08
54+
UART_TX_PIN = P0_06
55+
)
56+
57+
// I2C pins
58+
const (
59+
SDA_PIN = P0_15 // I2C0 external
60+
SCL_PIN = P0_17 // I2C0 external
61+
)
62+
63+
// SPI pins
64+
const (
65+
SPI0_SCK_PIN = P1_13 // SCK
66+
SPI0_SDI_PIN = P0_03 // SDI
67+
SPI0_SDO_PIN = P0_28 // SDO
68+
69+
)
70+
71+
// USB CDC identifiers
72+
const (
73+
usb_STRING_PRODUCT = "bluemicro840"
74+
usb_STRING_MANUFACTURER = "BlueMicro"
75+
)
76+
77+
var (
78+
usb_VID uint16 = 0x1d50
79+
usb_PID uint16 = 0x6161
80+
)

targets/bluemicro840.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"inherits": ["nrf52840", "nrf52840-s140v6-uf2"],
3+
"build-tags": ["bluemicro840"],
4+
"serial-port": ["1d50:6161"],
5+
"msd-volume-name": ["BLUEMICRO"]
6+
}

0 commit comments

Comments
 (0)