From d382f3a259ae8f711c4cd130d097da5dd83061d9 Mon Sep 17 00:00:00 2001 From: deadprogram Date: Sat, 17 Oct 2020 18:51:32 +0200 Subject: esp8266: add target for d1mini board and add pin mappings for SPI/I2C to help out implementers Signed-off-by: deadprogram --- src/machine/board_nodemcu.go | 14 ++++++++++++++ targets/d1mini.json | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 targets/d1mini.json diff --git a/src/machine/board_nodemcu.go b/src/machine/board_nodemcu.go index 30c16acf0..f9f1af4f9 100644 --- a/src/machine/board_nodemcu.go +++ b/src/machine/board_nodemcu.go @@ -19,3 +19,17 @@ const ( // Onboard blue LED (on the AI-Thinker module). const LED = D4 + +// SPI pins +const ( + SPI0_SCK_PIN = D5 + SPI0_SDO_PIN = D7 + SPI0_SDI_PIN = D6 + SPI0_CS0_PIN = D8 +) + +// I2C pins +const ( + SDA_PIN = D2 + SCL_PIN = D1 +) diff --git a/targets/d1mini.json b/targets/d1mini.json new file mode 100644 index 000000000..45116deca --- /dev/null +++ b/targets/d1mini.json @@ -0,0 +1,3 @@ +{ + "inherits": ["nodemcu"] +} -- cgit v1.2.3