Skip to content

Commit d382f3a

Browse files
deadprogramaykevl
authored andcommitted
esp8266: add target for d1mini board and add pin mappings for SPI/I2C to help out implementers
Signed-off-by: deadprogram <[email protected]>
1 parent 47dc108 commit d382f3a

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/machine/board_nodemcu.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,17 @@ const (
1919

2020
// Onboard blue LED (on the AI-Thinker module).
2121
const LED = D4
22+
23+
// SPI pins
24+
const (
25+
SPI0_SCK_PIN = D5
26+
SPI0_SDO_PIN = D7
27+
SPI0_SDI_PIN = D6
28+
SPI0_CS0_PIN = D8
29+
)
30+
31+
// I2C pins
32+
const (
33+
SDA_PIN = D2
34+
SCL_PIN = D1
35+
)

targets/d1mini.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"inherits": ["nodemcu"]
3+
}

0 commit comments

Comments
 (0)