1
0
mirror of https://github.com/2martens/uni.git synced 2026-05-06 19:36:26 +02:00

[ES] Improved documentation and code quality

Signed-óff-by: Jim Martens <github@2martens.de>
This commit is contained in:
2015-06-25 11:35:59 +02:00
parent 76eea3af12
commit 76c63a504d

View File

@ -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