1
0
mirror of https://github.com/kidoman/embd synced 2024-12-22 12:50:19 +01:00

Merge pull request #2 from wujiang/wujiang/println

Println doesn't accept formatting.
This commit is contained in:
Thorsten von Eicken 2016-08-27 00:31:59 -07:00 committed by GitHub
commit fac1f1c518

View File

@ -24,25 +24,25 @@ func main() {
panic(err)
}
fmt.Println("received data is: %v", dataBuf)
fmt.Println("received data is:", dataBuf)
dataReceived, err := spiBus.ReceiveData(3)
if err != nil {
panic(err)
}
fmt.Println("received data is: %v", dataReceived)
fmt.Println("received data is:", dataReceived)
dataByte := byte(1)
receivedByte, err := spiBus.TransferAndReceiveByte(dataByte)
if err != nil {
panic(err)
}
fmt.Println("received byte is: %v", receivedByte)
fmt.Println("received byte is:", receivedByte)
receivedByte, err = spiBus.ReceiveByte()
if err != nil {
panic(err)
}
fmt.Println("received byte is: %v", receivedByte)
fmt.Println("received byte is:", receivedByte)
}