From e9650720924bdad442000f6edd672a13061a635d Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 1 Aug 2020 16:36:02 +0200 Subject: [PATCH] [Hell] Added Module overrides for all Arduino core functions --- src/protocols/Hellschreiber/Hellschreiber.cpp | 8 ++++---- src/protocols/Hellschreiber/Hellschreiber.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/protocols/Hellschreiber/Hellschreiber.cpp b/src/protocols/Hellschreiber/Hellschreiber.cpp index 3a7bb6fc..d9caa41e 100644 --- a/src/protocols/Hellschreiber/Hellschreiber.cpp +++ b/src/protocols/Hellschreiber/Hellschreiber.cpp @@ -39,13 +39,13 @@ size_t HellClient::printGlyph(uint8_t* buff) { // print the character for(uint8_t mask = 0x40; mask >= 0x01; mask >>= 1) { for(int8_t i = HELL_FONT_HEIGHT - 1; i >= 0; i--) { - uint32_t start = micros(); + uint32_t start = Module::micros(); if(buff[i] & mask) { transmitDirect(_base, _baseHz); } else { 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]; buff[0] = 0x00; 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; @@ -97,7 +97,7 @@ size_t HellClient::print(__FlashStringHelper* fstr) { PGM_P p = reinterpret_cast(fstr); size_t n = 0; while(true) { - char c = pgm_read_byte(p++); + char c = RADIOLIB_PROGMEM_READ_BYTE(p++); if(c == '\0') { break; } diff --git a/src/protocols/Hellschreiber/Hellschreiber.h b/src/protocols/Hellschreiber/Hellschreiber.h index bfe20473..f7c634cb 100644 --- a/src/protocols/Hellschreiber/Hellschreiber.h +++ b/src/protocols/Hellschreiber/Hellschreiber.h @@ -14,7 +14,7 @@ // font definition: characters are stored in rows, // 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 -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 { 0b0001000, 0b0001000, 0b0001000, 0b0000000, 0b0001000 }, // ! { 0b0010100, 0b0010100, 0b0000000, 0b0000000, 0b0000000 }, // "