Checkpoint

This commit is contained in:
maze authored and maze committed 2026-10-29 17:29:41 +01:00
1 parent b8a493b93d
commit 85a9ec684c
54 files changed
+6855 -526

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
package ssd1xxx
// Config describes the OLED configuration.
type Config struct {
Width int
Height int
ExternalVCC bool
Init []Command
Suspend []Command
Resume []Command
}
// Command is one or more command bytes.
type Command interface {
Bytes() []byte
}
type Register byte
func (r Register) Bytes() []byte { return []byte{byte(r)} }
type RegisterArgs struct {
Register Register
Args []byte
}
func (r RegisterArgs) Bytes() []byte { return append([]byte{byte(r.Register)}, r.Args...) }
type RegisterFunc struct {
Register Register
Func func() []byte
}
func (r RegisterFunc) Bytes() []byte {
args := r.Func()
return append([]byte{byte(r.Register)}, args...)
}