mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-20 22:49:02 +00:00
sdcard: add support for spi sdcard driver
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// +build wioterminal
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"machine"
|
||||
)
|
||||
|
||||
func init() {
|
||||
spi = machine.SPI2
|
||||
spi.Configure(machine.SPIConfig{
|
||||
SCK: machine.SCK2,
|
||||
SDO: machine.SDO2,
|
||||
SDI: machine.SDI2,
|
||||
Frequency: 24000000,
|
||||
LSBFirst: false,
|
||||
Mode: 0, // phase=0, polarity=0
|
||||
})
|
||||
|
||||
csPin = machine.SS2
|
||||
|
||||
ledPin = machine.LED
|
||||
}
|
||||
Reference in New Issue
Block a user