We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 324c502 commit 06bcd7cCopy full SHA for 06bcd7c
rp2-pio/piolib/spi3w.go
@@ -25,6 +25,7 @@ type SPI3w struct {
25
}
26
27
func NewSPI3w(sm pio.StateMachine, dio, clk machine.Pin, baud uint32) (*SPI3w, error) {
28
+ baud *= 2 // We have 2 instructions per bit in the hot loop.
29
whole, frac, err := pio.ClkDivFromFrequency(baud, machine.CPUFrequency())
30
if err != nil {
31
return nil, err // Early return on bad clock.
0 commit comments