1
0
mirror of https://github.com/kidoman/embd synced 2025-01-03 10:31:36 +01:00
embd/samples/spi.go

19 lines
241 B
Go
Raw Normal View History

2014-01-30 16:20:43 +05:30
package main
import (
"fmt"
2014-02-10 05:05:41 +05:30
"github.com/kidoman/embd/spi"
2014-01-30 16:20:43 +05:30
)
func main() {
var rx_data uint8
fmt.Println("Hello")
bus, _ := spi.NewSpiBus()
rx_data, _ = bus.TransferAndRecieveByteData(8` )
fmt.Printf("Received %v \n", rx_data)
}