[Hell] Added Module overrides for all Arduino core functions
This commit is contained in:
parent
172e60cd47
commit
e965072092
2 changed files with 5 additions and 5 deletions
|
@ -39,13 +39,13 @@ size_t HellClient::printGlyph(uint8_t* buff) {
|
||||||
// print the character
|
// print the character
|
||||||
for(uint8_t mask = 0x40; mask >= 0x01; mask >>= 1) {
|
for(uint8_t mask = 0x40; mask >= 0x01; mask >>= 1) {
|
||||||
for(int8_t i = HELL_FONT_HEIGHT - 1; i >= 0; i--) {
|
for(int8_t i = HELL_FONT_HEIGHT - 1; i >= 0; i--) {
|
||||||
uint32_t start = micros();
|
uint32_t start = Module::micros();
|
||||||
if(buff[i] & mask) {
|
if(buff[i] & mask) {
|
||||||
transmitDirect(_base, _baseHz);
|
transmitDirect(_base, _baseHz);
|
||||||
} else {
|
} else {
|
||||||
standby();
|
standby();
|
||||||
}
|
}
|
||||||
while(micros() - start < _pixelDuration);
|
while(Module::micros() - start < _pixelDuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ size_t HellClient::write(uint8_t b) {
|
||||||
uint8_t buff[HELL_FONT_WIDTH];
|
uint8_t buff[HELL_FONT_WIDTH];
|
||||||
buff[0] = 0x00;
|
buff[0] = 0x00;
|
||||||
for(uint8_t i = 0; i < HELL_FONT_WIDTH - 2; i++) {
|
for(uint8_t i = 0; i < HELL_FONT_WIDTH - 2; i++) {
|
||||||
buff[i + 1] = pgm_read_byte(&HellFont[pos][i]);
|
buff[i + 1] = RADIOLIB_PROGMEM_READ_BYTE(&HellFont[pos][i]);
|
||||||
}
|
}
|
||||||
buff[HELL_FONT_WIDTH - 1] = 0x00;
|
buff[HELL_FONT_WIDTH - 1] = 0x00;
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ size_t HellClient::print(__FlashStringHelper* fstr) {
|
||||||
PGM_P p = reinterpret_cast<PGM_P>(fstr);
|
PGM_P p = reinterpret_cast<PGM_P>(fstr);
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
while(true) {
|
while(true) {
|
||||||
char c = pgm_read_byte(p++);
|
char c = RADIOLIB_PROGMEM_READ_BYTE(p++);
|
||||||
if(c == '\0') {
|
if(c == '\0') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
// font definition: characters are stored in rows,
|
// font definition: characters are stored in rows,
|
||||||
// least significant byte of each character is the first row
|
// least significant byte of each character is the first row
|
||||||
// Hellschreiber use 7x7 characters, but this simplified font uses only 5x5 - the extra bytes aren't stored
|
// Hellschreiber use 7x7 characters, but this simplified font uses only 5x5 - the extra bytes aren't stored
|
||||||
static const uint8_t HellFont[64][HELL_FONT_WIDTH - 2] PROGMEM = {
|
static const uint8_t HellFont[64][HELL_FONT_WIDTH - 2] RADIOLIB_PROGMEM = {
|
||||||
{ 0b0000000, 0b0000000, 0b0000000, 0b0000000, 0b0000000 }, // space
|
{ 0b0000000, 0b0000000, 0b0000000, 0b0000000, 0b0000000 }, // space
|
||||||
{ 0b0001000, 0b0001000, 0b0001000, 0b0000000, 0b0001000 }, // !
|
{ 0b0001000, 0b0001000, 0b0001000, 0b0000000, 0b0001000 }, // !
|
||||||
{ 0b0010100, 0b0010100, 0b0000000, 0b0000000, 0b0000000 }, // "
|
{ 0b0010100, 0b0010100, 0b0000000, 0b0000000, 0b0000000 }, // "
|
||||||
|
|
Loading…
Add table
Reference in a new issue