mirror of
https://github.com/kidoman/embd
synced 2024-12-31 17:11:36 +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)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("received data is: %v", dataBuf)
|
fmt.Println("received data is:", dataBuf)
|
||||||
|
|
||||||
dataReceived, err := spiBus.ReceiveData(3)
|
dataReceived, err := spiBus.ReceiveData(3)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("received data is: %v", dataReceived)
|
fmt.Println("received data is:", dataReceived)
|
||||||
|
|
||||||
dataByte := byte(1)
|
dataByte := byte(1)
|
||||||
receivedByte, err := spiBus.TransferAndReceiveByte(dataByte)
|
receivedByte, err := spiBus.TransferAndReceiveByte(dataByte)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
fmt.Println("received byte is: %v", receivedByte)
|
fmt.Println("received byte is:", receivedByte)
|
||||||
|
|
||||||
receivedByte, err = spiBus.ReceiveByte()
|
receivedByte, err = spiBus.ReceiveByte()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
fmt.Println("received byte is: %v", receivedByte)
|
fmt.Println("received byte is:", receivedByte)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user