Add: separated Parallel 8 bit lib
This commit is contained in:
@ -32,7 +32,9 @@ func newMt12864a(logger *log.Logger) (Display, error) {
|
||||
}
|
||||
|
||||
// Temp debug draw
|
||||
d.logger.Println("Draw...")
|
||||
d.test()
|
||||
d.logger.Println("Draw finished")
|
||||
|
||||
return &d, nil
|
||||
}
|
||||
@ -105,19 +107,30 @@ func (d *displayMt12864a) test() {
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xFF,
|
||||
},
|
||||
}
|
||||
_ = Logo128
|
||||
|
||||
for p := byte(0); p < 8; p++ {
|
||||
d.dev.WriteCodeL(p | 0xB8)
|
||||
d.dev.WriteCodeL(0x40)
|
||||
for c := 0; c < 64; c++ {
|
||||
d.dev.WriteDataL(Logo128[p][c])
|
||||
}
|
||||
d.dev.WriteCodeR(p | 0xB8)
|
||||
d.dev.WriteCodeR(0x40)
|
||||
for c := 64; c < 128; c++ {
|
||||
d.dev.WriteDataR(Logo128[p][c])
|
||||
}
|
||||
}
|
||||
d.logger.Println("Write")
|
||||
d.dev.WriteCodeL(0xB8)
|
||||
d.dev.WriteCodeL(0x40)
|
||||
d.dev.WriteDataL(47)
|
||||
d.logger.Println("Read")
|
||||
// d.dev.WriteCodeL(0xB8)
|
||||
d.dev.WriteCodeL(0x40)
|
||||
d.logger.Println(d.dev.ReadDataL())
|
||||
d.logger.Println(d.dev.ReadDataL())
|
||||
|
||||
// for p := byte(0); p < 8; p++ {
|
||||
// d.dev.WriteCodeL(p | 0xB8)
|
||||
// d.dev.WriteCodeL(0x40)
|
||||
// for c := 0; c < 64; c++ {
|
||||
// d.dev.WriteDataL(Logo128[p][c])
|
||||
// }
|
||||
// d.dev.WriteCodeR(p | 0xB8)
|
||||
// d.dev.WriteCodeR(0x40)
|
||||
// for c := 64; c < 128; c++ {
|
||||
// d.dev.WriteDataR(Logo128[p][c])
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
func (d *displayMt12864a) GetBounds() image.Rectangle {
|
||||
|
Reference in New Issue
Block a user