sdcard: add support for spi sdcard driver

This commit is contained in:
sago35
2021-05-14 18:40:29 +09:00
committed by Ron Evans
parent aa17ffd1cb
commit d07ad40373
11 changed files with 1319 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
// +build feather_m4 feather_m4_can
package main
import (
"machine"
)
func init() {
spi = machine.SPI0
spi.Configure(machine.SPIConfig{
SCK: machine.SPI0_SCK_PIN,
SDO: machine.SPI0_SDO_PIN,
SDI: machine.SPI0_SDI_PIN,
Frequency: 24000000,
LSBFirst: false,
Mode: 0, // phase=0, polarity=0
})
csPin = machine.D10
ledPin = machine.LED
}