mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-06 07:53:41 +00:00
microbitmatrix: move Size() to verion agnostic part
This commit is contained in:
committed by
Ron Evans
parent
b2fdd3c333
commit
a106fd48ce
@@ -70,7 +70,6 @@ func (d *Device) Display() error {
|
||||
if d.buffer[row][col] {
|
||||
d.pin[col].Low()
|
||||
}
|
||||
|
||||
}
|
||||
time.Sleep(time.Millisecond * 2)
|
||||
}
|
||||
@@ -105,8 +104,3 @@ func (d *Device) EnableAll() {
|
||||
d.pin[i-machine.LED_COL_1].High()
|
||||
}
|
||||
}
|
||||
|
||||
// Size returns the current size of the display.
|
||||
func (d *Device) Size() (w, h int16) {
|
||||
return 5, 5
|
||||
}
|
||||
|
||||
@@ -114,8 +114,3 @@ func (d *Device) EnableAll() {
|
||||
d.pin[5+i].High()
|
||||
}
|
||||
}
|
||||
|
||||
// Size returns the current size of the display.
|
||||
func (d *Device) Size() (w, h int16) {
|
||||
return 5, 5
|
||||
}
|
||||
|
||||
@@ -40,3 +40,8 @@ func (d *Device) GetPixel(x int16, y int16) bool {
|
||||
}
|
||||
return d.buffer[matrixRotations[d.rotation][y][x][0]][matrixRotations[d.rotation][y][x][1]]
|
||||
}
|
||||
|
||||
// Size returns the current size of the display.
|
||||
func (d *Device) Size() (w, h int16) {
|
||||
return 5, 5
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user