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:
commit
fac1f1c518
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user