mirror of
https://github.com/2martens/uni.git
synced 2026-05-06 11:26:25 +02:00
[ES] Improved documentation and code quality
Signed-óff-by: Jim Martens <github@2martens.de>
This commit is contained in:
@ -37,9 +37,7 @@ void setup()
|
||||
digitalWrite(dcPin, HIGH);
|
||||
|
||||
// initialize screen buffer
|
||||
for (int i = 0; i < maxBufferIndex; i++) {
|
||||
screenBuffer[i] = 0x0;
|
||||
}
|
||||
resetBuffer();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -60,6 +58,9 @@ void loop()
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets display.
|
||||
*/
|
||||
void resetDisplay()
|
||||
{
|
||||
digitalWrite(rstPin, LOW);
|
||||
@ -67,6 +68,11 @@ void resetDisplay()
|
||||
digitalWrite(rstPin, HIGH);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the screen buffer into the display.
|
||||
*
|
||||
* It does NOT reset the buffer.
|
||||
*/
|
||||
void flushBuffer()
|
||||
{
|
||||
for (int i = 0; i < maxBufferIndex; i++) {
|
||||
@ -74,6 +80,18 @@ void flushBuffer()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the buffer.
|
||||
*
|
||||
* Writes 0 in all fields.
|
||||
*/
|
||||
void resetBuffer()
|
||||
{
|
||||
for (int i = 0; i < maxBufferIndex; i++) {
|
||||
screenBuffer[i] = 0x0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the pixel at the given location.
|
||||
* @param x
|
||||
|
||||
Reference in New Issue
Block a user