🧑‍💻 Remove extraneous 'inline' hints

This commit is contained in:
Scott Lahteine
2021-12-28 02:57:24 -06:00
committed by Scott Lahteine
parent ccc66a8528
commit 5b9f3bd4b1
67 changed files with 537 additions and 537 deletions

View File

@ -95,14 +95,14 @@ public:
// Checks two things: Can we confirm the presence of the display and has we initialized it.
// (both boils down that the display answered to our chatting)
static inline bool isInitialized() { return Initialized; }
static bool isInitialized() { return Initialized; }
private:
static void WriteHeader(uint16_t adr, uint8_t cmd, uint8_t payloadlen);
static void WritePGM(const char str[], uint8_t len);
static void ProcessRx();
static inline uint16_t swap16(const uint16_t value) { return (value & 0xFFU) << 8U | (value >> 8U); }
static uint16_t swap16(const uint16_t value) { return (value & 0xFFU) << 8U | (value >> 8U); }
static rx_datagram_state_t rx_datagram_state;
static uint8_t rx_datagram_len;
static bool Initialized, no_reentrance;

View File

@ -38,10 +38,10 @@ public:
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifying whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static inline void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
}
static inline void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
}
@ -213,13 +213,13 @@ public:
}
// Force an update of all VP on the current screen.
static inline void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; }
static void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; }
// Has all VPs sent to the screen
static inline bool IsScreenComplete() { return ScreenComplete; }
static bool IsScreenComplete() { return ScreenComplete; }
static inline DGUSLCD_Screens getCurrentScreen() { return current_screen; }
static DGUSLCD_Screens getCurrentScreen() { return current_screen; }
static inline void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; }
static void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; }
private:
static DGUSLCD_Screens current_screen; //< currently on screen

View File

@ -38,10 +38,10 @@ public:
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifying whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static inline void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
}
static inline void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
}
@ -213,13 +213,13 @@ public:
}
// Force an update of all VP on the current screen.
static inline void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; }
static void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; }
// Has all VPs sent to the screen
static inline bool IsScreenComplete() { return ScreenComplete; }
static bool IsScreenComplete() { return ScreenComplete; }
static inline DGUSLCD_Screens getCurrentScreen() { return current_screen; }
static DGUSLCD_Screens getCurrentScreen() { return current_screen; }
static inline void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; }
static void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; }
private:
static DGUSLCD_Screens current_screen; //< currently on screen

View File

@ -38,10 +38,10 @@ public:
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifying whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static inline void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
}
static inline void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
}
@ -280,13 +280,13 @@ public:
}
// Force an update of all VP on the current screen.
static inline void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; }
static void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; }
// Has all VPs sent to the screen
static inline bool IsScreenComplete() { return ScreenComplete; }
static bool IsScreenComplete() { return ScreenComplete; }
static inline DGUSLCD_Screens getCurrentScreen() { return current_screen; }
static DGUSLCD_Screens getCurrentScreen() { return current_screen; }
static inline void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; }
static void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; }
private:
static DGUSLCD_Screens current_screen; //< currently on screen

View File

@ -38,10 +38,10 @@ public:
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifying whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static inline void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
}
static inline void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
}
@ -213,13 +213,13 @@ public:
}
// Force an update of all VP on the current screen.
static inline void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; }
static void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; }
// Has all VPs sent to the screen
static inline bool IsScreenComplete() { return ScreenComplete; }
static bool IsScreenComplete() { return ScreenComplete; }
static inline DGUSLCD_Screens getCurrentScreen() { return current_screen; }
static DGUSLCD_Screens getCurrentScreen() { return current_screen; }
static inline void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; }
static void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; }
private:
static DGUSLCD_Screens current_screen; //< currently on screen

View File

@ -98,7 +98,7 @@ public:
// Checks two things: Can we confirm the presence of the display and has we initialized it.
// (both boils down that the display answered to our chatting)
static inline bool IsInitialized() {
static bool IsInitialized() {
return initialized;
}

View File

@ -43,8 +43,8 @@
#define min(a,b) ((a)<(b)?(a):(b))
#else
namespace UI {
static inline uint32_t safe_millis() { return millis(); }
static inline void yield() {}
static uint32_t safe_millis() { return millis(); }
static void yield() {}
};
#endif

View File

@ -40,13 +40,13 @@
template<typename port_t,uint8_t bits>
struct port_pin {
typedef port_t port;
static inline void set_high() {port::port() = (port::port() | bits);}
static inline void set_low() {port::port() = (port::port() & (~bits));}
static inline void set_input() {port::ddr() = (port::ddr() & (~bits));}
static inline void set_input_pullup() {set_input(); set_high();}
static inline void set_output() {port::ddr() = (port::ddr() | bits);}
static inline uint8_t read() {return port::pin() & bits;}
static inline void write(bool v) {if (v) set_high(); else set_low();}
static void set_high() {port::port() = (port::port() | bits);}
static void set_low() {port::port() = (port::port() & (~bits));}
static void set_input() {port::ddr() = (port::ddr() & (~bits));}
static void set_input_pullup() {set_input(); set_high();}
static void set_output() {port::ddr() = (port::ddr() | bits);}
static uint8_t read() {return port::pin() & bits;}
static void write(bool v) {if (v) set_high(); else set_low();}
};
#define MAKE_AVR_PORT_PINS(ID) \
@ -109,13 +109,13 @@
template<uint8_t p>
struct arduino_digital_pin {
static constexpr uint8_t pin = p;
static inline void set_high() {digitalWrite(p, HIGH);}
static inline void set_low() {digitalWrite(p, LOW);}
static inline void set_input() {pinMode(p, INPUT);}
static inline void set_input_pullup() {pinMode(p, INPUT_PULLUP);}
static inline void set_output() {pinMode(p, OUTPUT);}
static inline uint8_t read() {return digitalRead(p);}
static inline void write(bool v) {digitalWrite(p, v ? HIGH : LOW);}
static void set_high() {digitalWrite(p, HIGH);}
static void set_low() {digitalWrite(p, LOW);}
static void set_input() {pinMode(p, INPUT);}
static void set_input_pullup() {pinMode(p, INPUT_PULLUP);}
static void set_output() {pinMode(p, OUTPUT);}
static uint8_t read() {return digitalRead(p);}
static void write(bool v) {digitalWrite(p, v ? HIGH : LOW);}
};
#define MAKE_ARDUINO_PINS(ID) typedef arduino_digital_pin<ID> ARDUINO_DIGITAL_##ID;

View File

@ -29,10 +29,10 @@ class SoundList {
} list[];
public:
static const uint8_t n;
static inline const char* name(uint8_t val) {
static const char* name(uint8_t val) {
return (const char* ) pgm_read_ptr_far(&list[val].name);
}
static inline FTDI::SoundPlayer::sound_t* data(uint8_t val) {
static FTDI::SoundPlayer::sound_t* data(uint8_t val) {
return (FTDI::SoundPlayer::sound_t*) pgm_read_ptr_far(&list[val].data);
}
};

View File

@ -96,12 +96,12 @@ private:
static uint8_t m_pageData[SPI_FLASH_PageSize];
static uint32_t m_currentPage;
static uint16_t m_pageDataUsed;
static inline uint16_t pageDataFree() { return SPI_FLASH_PageSize - m_pageDataUsed; }
static uint16_t pageDataFree() { return SPI_FLASH_PageSize - m_pageDataUsed; }
static uint32_t m_startAddress;
#if HAS_SPI_FLASH_COMPRESSION
static uint8_t m_compressedData[SPI_FLASH_PageSize];
static uint16_t m_compressedDataUsed;
static inline uint16_t compressedDataFree() { return SPI_FLASH_PageSize - m_compressedDataUsed; }
static uint16_t compressedDataFree() { return SPI_FLASH_PageSize - m_compressedDataUsed; }
#endif
};