mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-12 19:03:42 +00:00
Low-level IO driver for serial flash memory via SPI and QSPI (#124)
* QSPI/SPI: flash memory functions
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"machine"
|
||||
|
||||
"tinygo.org/x/drivers/examples/flash/console"
|
||||
"tinygo.org/x/drivers/flash"
|
||||
)
|
||||
|
||||
func main() {
|
||||
console_example.RunFor(
|
||||
flash.NewSPI(
|
||||
&machine.SPI1,
|
||||
machine.SPI1_MOSI_PIN,
|
||||
machine.SPI1_MISO_PIN,
|
||||
machine.SPI1_SCK_PIN,
|
||||
machine.SPI1_CS_PIN,
|
||||
),
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user