mirror of https://github.com/smartykit/apple1.git
parent
c5e455f6bf
commit
1a99603c45
|
@ -107,13 +107,40 @@ void SmartyKit_DisplayDriver::setup(uint16_t setupColor, uint16_t setupBgColor,
|
||||||
bCursorOn = false;
|
bCursorOn = false;
|
||||||
setCursor(0,0);
|
setCursor(0,0);
|
||||||
clearScreen(bgColor);
|
clearScreen(bgColor);
|
||||||
|
// test ASCII art (a person)
|
||||||
|
// print(' ',color);print('o', color);print(' ', color); print('\n', color);
|
||||||
|
// print('/',color);print('|', color);print('\\', color); print('\n', color);
|
||||||
|
// print('/',color);print(' ', color);print('\\', color); print('\n', color);
|
||||||
// startup ASCII art
|
// startup ASCII art
|
||||||
print(' ',color);print('o', color);print(' ', color); print('\n', color);
|
ASCIIart();
|
||||||
print('/',color);print('|', color);print('\\', color); print('\n', color);
|
|
||||||
print('/',color);print(' ', color);print('\\', color); print('\n', color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SmartyKit_DisplayDriver::ASCIIart(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
char c = '\0';
|
||||||
|
char* ptrBuffer;
|
||||||
|
|
||||||
|
for (int i = 0; i < SCREEN_ROWS; i++)
|
||||||
|
{
|
||||||
|
ptrBuffer = (char*) malloc(2*SCREEN_COLS);
|
||||||
|
if (ptrBuffer != NULL)
|
||||||
|
{
|
||||||
|
//reading current string from PROGMEM to RAM
|
||||||
|
strcpy_P(ptrBuffer, (char *)pgm_read_word(&(string_table[i])));
|
||||||
|
|
||||||
|
for (int j = 0; j < SCREEN_COLS; j++)
|
||||||
|
{
|
||||||
|
c = ptrBuffer[j];
|
||||||
|
print(c,color);
|
||||||
|
}
|
||||||
|
free(ptrBuffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void SmartyKit_DisplayDriver::initSPI(void)
|
void SmartyKit_DisplayDriver::initSPI(void)
|
||||||
{
|
{
|
||||||
if (_cs >= 0) {
|
if (_cs >= 0) {
|
||||||
|
|
Loading…
Reference in New Issue