mirror of
https://github.com/kidoman/embd
synced 2024-12-22 04:40:04 +01:00
Println doesn't accept formatting.
It looks like this is caused by confusion between `fmt.Println` and `fmt.Printf`.
This commit is contained in:
parent
42be169804
commit
1b48067d77
@ -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