this is what I meant

This commit is contained in:
soypat
2025-07-02 10:44:06 -03:00
parent d02d21ecea
commit ff4d15cea9
6 changed files with 63 additions and 175 deletions
+22
View File
@@ -0,0 +1,22 @@
//go:build thumby
package main
import (
"machine"
"tinygo.org/x/drivers/ssd1306"
)
func makeSSD1306(_, _ int16, address uint16) (*ssd1306.Device, error) {
// width and height are known for thumby.
machine.SPI0.Configure(machine.SPIConfig{})
display := ssd1306.NewSPI(machine.SPI0, machine.THUMBY_DC_PIN, machine.THUMBY_RESET_PIN, machine.THUMBY_CS_PIN)
display.Configure(ssd1306.Config{
Width: 72,
Height: 40,
ResetCol: ssd1306.ResetValue{28, 99},
ResetPage: ssd1306.ResetValue{0, 5},
})
return &display, nil
}