Add: mt12232a lib

This commit is contained in:
Andrey Egorov
2024-09-02 13:39:06 +03:00
parent efb2447c84
commit c6af2620e0
3 changed files with 240 additions and 187 deletions

View File

@ -16,6 +16,7 @@ const (
// Interface for MT displays (do not set cristals bits)
type Device interface {
Reset()
WriteByte(b byte, cd rpio.State)
ReadByte(cd rpio.State) byte
@ -53,6 +54,15 @@ func New(logger *log.Logger, pins DevicePins) Device {
}
}
func (d *device) Reset() {
d.PinA0.Output()
d.PinRW.Output()
d.PinE.Output()
d.PinRES.Output()
d.busOutput()
d.PinE.Low()
}
func (d *device) WriteByte(b byte, cd rpio.State) {
// d.logger.Println("Write byte", b, cd, l, r)
d.busOutput()