Skip to content

Commit 826e62d

Browse files
committed
Fix pin configuration in NewSPI function
1 parent 70a085f commit 826e62d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ssd1306/ssd1306_spi.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ type SPIBus struct {
1919
// NewSPI creates a new SSD1306 connection. The SPI wire must already be configured.
2020
func NewSPI(bus drivers.SPI, dcPin, resetPin, csPin pin.Output) *Device {
2121
// configure GPIO pins (on baremetal targets only, for backwards compatibility)
22-
legacy.ConfigurePinOut(b.dcPin)
23-
legacy.ConfigurePinOut(b.resetPin)
24-
legacy.ConfigurePinOut(b.csPin)
22+
legacy.ConfigurePinOut(dcPin)
23+
legacy.ConfigurePinOut(resetPin)
24+
legacy.ConfigurePinOut(csPin)
2525
return &Device{
2626
bus: &SPIBus{
2727
wire: bus,

0 commit comments

Comments
 (0)