mirror of https://github.com/MLXXXp/Arduboy2.git
Modify source based on MLXXXp comments.
This commit is contained in:
parent
2459f50075
commit
492d74b833
|
|
@ -678,7 +678,7 @@ void Arduboy2Base::fillScreen(uint8_t color)
|
||||||
"ldi %[color], 0xFF\n"
|
"ldi %[color], 0xFF\n"
|
||||||
// counter = 0
|
// counter = 0
|
||||||
"clr __tmp_reg__\n"
|
"clr __tmp_reg__\n"
|
||||||
"loopto:\n"
|
"1:\n"
|
||||||
// (4x) push zero into screen buffer,
|
// (4x) push zero into screen buffer,
|
||||||
// then increment buffer position
|
// then increment buffer position
|
||||||
"st Z+, %[color]\n"
|
"st Z+, %[color]\n"
|
||||||
|
|
@ -689,7 +689,7 @@ void Arduboy2Base::fillScreen(uint8_t color)
|
||||||
"inc __tmp_reg__\n"
|
"inc __tmp_reg__\n"
|
||||||
// repeat for 256 loops
|
// repeat for 256 loops
|
||||||
// (until counter rolls over back to 0)
|
// (until counter rolls over back to 0)
|
||||||
"brne loopto\n"
|
"brne 1b\n"
|
||||||
: [color] "+d" (color),
|
: [color] "+d" (color),
|
||||||
"+z" (bPtr)
|
"+z" (bPtr)
|
||||||
:
|
:
|
||||||
|
|
|
||||||
|
|
@ -580,7 +580,7 @@ class Arduboy2Base : public Arduboy2Core
|
||||||
*
|
*
|
||||||
* \param color The fill color (optional; defaults to WHITE).
|
* \param color The fill color (optional; defaults to WHITE).
|
||||||
*/
|
*/
|
||||||
void fillScreen(uint8_t color = WHITE) __attribute__ ((noinline));
|
void fillScreen(uint8_t color = WHITE);
|
||||||
|
|
||||||
/** \brief
|
/** \brief
|
||||||
* Draw a rectangle with rounded corners.
|
* Draw a rectangle with rounded corners.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue