diff options
author | deadprogram <[email protected]> | 2020-10-17 18:51:32 +0200 |
---|---|---|
committer | Ayke <[email protected]> | 2020-10-17 19:57:53 +0200 |
commit | d382f3a259ae8f711c4cd130d097da5dd83061d9 (patch) | |
tree | 5f42e58066055b38801f88f2512d15cb806bb695 | |
parent | 47dc1087e81463d8614b4b7437bbd3c0a489bbbc (diff) | |
download | tinygo-d382f3a259ae8f711c4cd130d097da5dd83061d9.tar.gz tinygo-d382f3a259ae8f711c4cd130d097da5dd83061d9.zip |
esp8266: add target for d1mini board and add pin mappings for SPI/I2C to help out implementers
Signed-off-by: deadprogram <[email protected]>
-rw-r--r-- | src/machine/board_nodemcu.go | 14 | ||||
-rw-r--r-- | targets/d1mini.json | 3 |
2 files changed, 17 insertions, 0 deletions
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"] +} |