-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uc8151: improvements to speed and also add flicker-free mode based on @…
…antirez code example Signed-off-by: deadprogram <[email protected]>
- Loading branch information
1 parent
7dbca2a
commit 6c8610e
Showing
4 changed files
with
182 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package uc8151 | ||
|
||
// LUTType is the look-up table for the display | ||
type LUTType [42]uint8 | ||
|
||
type LUTSet struct { | ||
VCOM LUTType | ||
WW LUTType | ||
BW LUTType | ||
WB LUTType | ||
BB LUTType | ||
} | ||
|
||
func (lut *LUTType) Clear() { | ||
for i := range lut { | ||
lut[i] = 0 | ||
} | ||
} | ||
|
||
func (lut *LUTType) SetRow(row int, pat uint8, dur [4]uint8, rep uint8) error { | ||
index := row * 6 | ||
lut[index] = pat | ||
lut[index+1] = dur[0] | ||
lut[index+2] = dur[1] | ||
lut[index+3] = dur[2] | ||
lut[index+4] = dur[3] | ||
lut[index+5] = rep | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.