mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-16 21:03:23 +00:00
remove stxx defaults offsets
This commit is contained in:
committed by
Ron Evans
parent
3bb5b4519b
commit
dc883d913d
+2
-15
@@ -76,21 +76,8 @@ func (d *Device) Configure(cfg Config) {
|
|||||||
d.height = 160
|
d.height = 160
|
||||||
}
|
}
|
||||||
d.rotation = cfg.Rotation
|
d.rotation = cfg.Rotation
|
||||||
|
d.rowOffset = cfg.RowOffset
|
||||||
if cfg.RowOffset != 0 {
|
d.columnOffset = cfg.ColumnOffset
|
||||||
d.rowOffset = cfg.RowOffset
|
|
||||||
} else {
|
|
||||||
d.rowOffset = 1
|
|
||||||
}
|
|
||||||
if cfg.ColumnOffset != 0 {
|
|
||||||
d.columnOffset = cfg.ColumnOffset
|
|
||||||
} else {
|
|
||||||
if d.model == MINI80x160 {
|
|
||||||
d.columnOffset = 26
|
|
||||||
} else {
|
|
||||||
d.columnOffset = 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
d.batchLength = d.width
|
d.batchLength = d.width
|
||||||
if d.height > d.width {
|
if d.height > d.width {
|
||||||
|
|||||||
+2
-9
@@ -66,15 +66,8 @@ func (d *Device) Configure(cfg Config) {
|
|||||||
d.height = 240
|
d.height = 240
|
||||||
}
|
}
|
||||||
d.rotation = cfg.Rotation
|
d.rotation = cfg.Rotation
|
||||||
|
d.rowOffsetCfg = cfg.RowOffset
|
||||||
if cfg.RowOffset != 0 {
|
d.columnOffsetCfg = cfg.ColumnOffset
|
||||||
d.rowOffsetCfg = cfg.RowOffset
|
|
||||||
} else {
|
|
||||||
d.rowOffsetCfg = 80
|
|
||||||
}
|
|
||||||
if cfg.ColumnOffset != 0 {
|
|
||||||
d.columnOffsetCfg = cfg.ColumnOffset
|
|
||||||
}
|
|
||||||
|
|
||||||
d.batchLength = int32(d.width)
|
d.batchLength = int32(d.width)
|
||||||
if d.height > d.width {
|
if d.height > d.width {
|
||||||
|
|||||||
Reference in New Issue
Block a user