Make "static" the first keyword, for consistency

Suggested by @Pharap
This commit is contained in:
Scott Allen 2020-03-16 14:44:28 -04:00
parent 4f884f4ed2
commit b854e2295f
2 changed files with 40 additions and 40 deletions

View File

@ -85,7 +85,7 @@ class Arduboy2Audio
* `Arduboy2Core::boot()` is used instead of `Arduboy2Base::begin()` and the * `Arduboy2Core::boot()` is used instead of `Arduboy2Base::begin()` and the
* sketch includes sound, then this function should be called after `boot()`. * sketch includes sound, then this function should be called after `boot()`.
*/ */
void static begin(); static void begin();
/** \brief /** \brief
* Turn sound on. * Turn sound on.
@ -97,7 +97,7 @@ class Arduboy2Audio
* *
* \see off() toggle() saveOnOff() * \see off() toggle() saveOnOff()
*/ */
void static on(); static void on();
/** \brief /** \brief
* Turn sound off (mute). * Turn sound off (mute).
@ -109,7 +109,7 @@ class Arduboy2Audio
* *
* \see on() toggle() saveOnOff() * \see on() toggle() saveOnOff()
*/ */
void static off(); static void off();
/** \brief /** \brief
* Toggle the sound on/off state. * Toggle the sound on/off state.
@ -122,7 +122,7 @@ class Arduboy2Audio
* *
* \see on() off() saveOnOff() * \see on() off() saveOnOff()
*/ */
void static toggle(); static void toggle();
/** \brief /** \brief
* Save the current sound state in EEPROM. * Save the current sound state in EEPROM.
@ -138,7 +138,7 @@ class Arduboy2Audio
* *
* \see on() off() toggle() * \see on() off() toggle()
*/ */
void static saveOnOff(); static void saveOnOff();
/** \brief /** \brief
* Get the current sound state. * Get the current sound state.
@ -152,10 +152,10 @@ class Arduboy2Audio
* *
* \see on() off() toggle() * \see on() off() toggle()
*/ */
bool static enabled(); static bool enabled();
protected: protected:
bool static audio_enabled; static bool audio_enabled;
}; };
#endif #endif

View File

@ -345,7 +345,7 @@ class Arduboy2Core
* app should be able to sleep maybe half the time in between rendering * app should be able to sleep maybe half the time in between rendering
* it's own frames. * it's own frames.
*/ */
void static idle(); static void idle();
/** \brief /** \brief
* Put the display into data mode. * Put the display into data mode.
@ -361,7 +361,7 @@ class Arduboy2Core
* *
* \see LCDCommandMode() SPItransfer() * \see LCDCommandMode() SPItransfer()
*/ */
void static LCDDataMode(); static void LCDDataMode();
/** \brief /** \brief
* Put the display into command mode. * Put the display into command mode.
@ -385,7 +385,7 @@ class Arduboy2Core
* *
* \see LCDDataMode() sendLCDCommand() SPItransfer() * \see LCDDataMode() sendLCDCommand() SPItransfer()
*/ */
void static LCDCommandMode(); static void LCDCommandMode();
/** \brief /** \brief
* Transfer a byte to the display. * Transfer a byte to the display.
@ -400,7 +400,7 @@ class Arduboy2Core
* *
* \see LCDDataMode() LCDCommandMode() sendLCDCommand() * \see LCDDataMode() LCDCommandMode() sendLCDCommand()
*/ */
void static SPItransfer(uint8_t data); static void SPItransfer(uint8_t data);
/** \brief /** \brief
* Turn the display off. * Turn the display off.
@ -413,7 +413,7 @@ class Arduboy2Core
* *
* \see displayOn() * \see displayOn()
*/ */
void static displayOff(); static void displayOff();
/** \brief /** \brief
* Turn the display on. * Turn the display on.
@ -429,21 +429,21 @@ class Arduboy2Core
* *
* \see displayOff() * \see displayOff()
*/ */
void static displayOn(); static void displayOn();
/** \brief /** \brief
* Get the width of the display in pixels. * Get the width of the display in pixels.
* *
* \return The width of the display in pixels. * \return The width of the display in pixels.
*/ */
constexpr uint8_t static width() { return WIDTH; } static constexpr uint8_t width() { return WIDTH; }
/** \brief /** \brief
* Get the height of the display in pixels. * Get the height of the display in pixels.
* *
* \return The height of the display in pixels. * \return The height of the display in pixels.
*/ */
constexpr uint8_t static height() { return HEIGHT; } static constexpr uint8_t height() { return HEIGHT; }
/** \brief /** \brief
* Get the current state of all buttons as a bitmask. * Get the current state of all buttons as a bitmask.
@ -458,7 +458,7 @@ class Arduboy2Core
* *
* LEFT_BUTTON, RIGHT_BUTTON, UP_BUTTON, DOWN_BUTTON, A_BUTTON, B_BUTTON * LEFT_BUTTON, RIGHT_BUTTON, UP_BUTTON, DOWN_BUTTON, A_BUTTON, B_BUTTON
*/ */
uint8_t static buttonsState(); static uint8_t buttonsState();
/** \brief /** \brief
* Paint 8 pixels vertically to the display. * Paint 8 pixels vertically to the display.
@ -490,7 +490,7 @@ class Arduboy2Core
* . . . . . . . . (end of page 1) X . X . . . . . (end of page 1) * . . . . . . . . (end of page 1) X . X . . . . . (end of page 1)
* . . . . . . . . (page 2) . . . . . . . . (page 2) * . . . . . . . . (page 2) . . . . . . . . (page 2)
*/ */
void static paint8Pixels(uint8_t pixels); static void paint8Pixels(uint8_t pixels);
/** \brief /** \brief
* Paints an entire image directly to the display from program memory. * Paints an entire image directly to the display from program memory.
@ -508,7 +508,7 @@ class Arduboy2Core
* *
* \see paint8Pixels() * \see paint8Pixels()
*/ */
void static paintScreen(const uint8_t *image); static void paintScreen(const uint8_t *image);
/** \brief /** \brief
* Paints an entire image directly to the display from an array in RAM. * Paints an entire image directly to the display from an array in RAM.
@ -532,7 +532,7 @@ class Arduboy2Core
* *
* \see paint8Pixels() * \see paint8Pixels()
*/ */
void static paintScreen(uint8_t image[], bool clear = false); static void paintScreen(uint8_t image[], bool clear = false);
/** \brief /** \brief
* Blank the display screen by setting all pixels off. * Blank the display screen by setting all pixels off.
@ -541,7 +541,7 @@ class Arduboy2Core
* All pixels on the screen will be written with a value of 0 to turn * All pixels on the screen will be written with a value of 0 to turn
* them off. * them off.
*/ */
void static blank(); static void blank();
/** \brief /** \brief
* Invert the entire display or set it back to normal. * Invert the entire display or set it back to normal.
@ -558,7 +558,7 @@ class Arduboy2Core
* until it is set back to non-inverted mode by calling this function with * until it is set back to non-inverted mode by calling this function with
* `false`. * `false`.
*/ */
void static invert(bool inverse); static void invert(bool inverse);
/** \brief /** \brief
* Turn all display pixels on or display the buffer contents. * Turn all display pixels on or display the buffer contents.
@ -579,7 +579,7 @@ class Arduboy2Core
* *
* \see invert() * \see invert()
*/ */
void static allPixelsOn(bool on); static void allPixelsOn(bool on);
/** \brief /** \brief
* Flip the display vertically or set it back to normal. * Flip the display vertically or set it back to normal.
@ -597,7 +597,7 @@ class Arduboy2Core
* *
* \see flipHorizontal() * \see flipHorizontal()
*/ */
void static flipVertical(bool flipped); static void flipVertical(bool flipped);
/** \brief /** \brief
* Flip the display horizontally or set it back to normal. * Flip the display horizontally or set it back to normal.
@ -615,7 +615,7 @@ class Arduboy2Core
* *
* \see flipVertical() * \see flipVertical()
*/ */
void static flipHorizontal(bool flipped); static void flipHorizontal(bool flipped);
/** \brief /** \brief
* Send a single command byte to the display. * Send a single command byte to the display.
@ -631,7 +631,7 @@ class Arduboy2Core
* Sending improper commands to the display can place it into invalid or * Sending improper commands to the display can place it into invalid or
* unexpected states, possibly even causing physical damage. * unexpected states, possibly even causing physical damage.
*/ */
void static sendLCDCommand(uint8_t command); static void sendLCDCommand(uint8_t command);
/** \brief /** \brief
* Set the light output of the RGB LED. * Set the light output of the RGB LED.
@ -665,7 +665,7 @@ class Arduboy2Core
* *
* \see setRGBled(uint8_t, uint8_t) digitalWriteRGB() freeRGBled() * \see setRGBled(uint8_t, uint8_t) digitalWriteRGB() freeRGBled()
*/ */
void static setRGBled(uint8_t red, uint8_t green, uint8_t blue); static void setRGBled(uint8_t red, uint8_t green, uint8_t blue);
/** \brief /** \brief
* Set the brightness of one of the RGB LEDs without affecting the others. * Set the brightness of one of the RGB LEDs without affecting the others.
@ -687,7 +687,7 @@ class Arduboy2Core
* *
* \see setRGBled(uint8_t, uint8_t, uint8_t) digitalWriteRGB() freeRGBled() * \see setRGBled(uint8_t, uint8_t, uint8_t) digitalWriteRGB() freeRGBled()
*/ */
void static setRGBled(uint8_t color, uint8_t val); static void setRGBled(uint8_t color, uint8_t val);
/** \brief /** \brief
@ -700,7 +700,7 @@ class Arduboy2Core
* *
* \see digitalWriteRGB() setRGBled() * \see digitalWriteRGB() setRGBled()
*/ */
void static freeRGBled(); static void freeRGBled();
/** \brief /** \brief
* Set the RGB LEDs digitally, to either fully on or fully off. * Set the RGB LEDs digitally, to either fully on or fully off.
@ -745,7 +745,7 @@ class Arduboy2Core
* *
* \see digitalWriteRGB(uint8_t, uint8_t) setRGBled() freeRGBled() * \see digitalWriteRGB(uint8_t, uint8_t) setRGBled() freeRGBled()
*/ */
void static digitalWriteRGB(uint8_t red, uint8_t green, uint8_t blue); static void digitalWriteRGB(uint8_t red, uint8_t green, uint8_t blue);
/** \brief /** \brief
* Set one of the RGB LEDs digitally, to either fully on or fully off. * Set one of the RGB LEDs digitally, to either fully on or fully off.
@ -763,7 +763,7 @@ class Arduboy2Core
* *
* \see digitalWriteRGB(uint8_t, uint8_t, uint8_t) setRGBled() freeRGBled() * \see digitalWriteRGB(uint8_t, uint8_t, uint8_t) setRGBled() freeRGBled()
*/ */
void static digitalWriteRGB(uint8_t color, uint8_t val); static void digitalWriteRGB(uint8_t color, uint8_t val);
/** \brief /** \brief
* Initialize the Arduboy's hardware. * Initialize the Arduboy's hardware.
@ -780,7 +780,7 @@ class Arduboy2Core
* *
* \see Arduboy2Base::begin() * \see Arduboy2Base::begin()
*/ */
void static boot(); static void boot();
/** \brief /** \brief
* Allow upload when the bootloader "magic number" could be corrupted. * Allow upload when the bootloader "magic number" could be corrupted.
@ -801,7 +801,7 @@ class Arduboy2Core
* *
* \see Arduboy2Base::flashlight() boot() * \see Arduboy2Base::flashlight() boot()
*/ */
void static safeMode(); static void safeMode();
/** \brief /** \brief
* Delay for the number of milliseconds, specified as a 16 bit value. * Delay for the number of milliseconds, specified as a 16 bit value.
@ -814,7 +814,7 @@ class Arduboy2Core
* 65535 milliseconds (about 65.5 seconds). Using this function instead * 65535 milliseconds (about 65.5 seconds). Using this function instead
* of Arduino `delay()` will save a few bytes of code. * of Arduino `delay()` will save a few bytes of code.
*/ */
void static delayShort(uint16_t ms) __attribute__ ((noinline)); static void delayShort(uint16_t ms) __attribute__ ((noinline));
/** \brief /** \brief
* Exit the sketch and start the bootloader * Exit the sketch and start the bootloader
@ -832,20 +832,20 @@ class Arduboy2Core
* *
* \see ARDUBOY_NO_USB * \see ARDUBOY_NO_USB
*/ */
void static exitToBootloader(); static void exitToBootloader();
// Replacement main() that eliminates the USB stack code. // Replacement main() that eliminates the USB stack code.
// Used by the ARDUBOY_NO_USB macro. This should not be called // Used by the ARDUBOY_NO_USB macro. This should not be called
// directly from a sketch. // directly from a sketch.
void static mainNoUSB(); static void mainNoUSB();
protected: protected:
// internals // internals
void static setCPUSpeed8MHz(); static void setCPUSpeed8MHz();
void static bootSPI(); static void bootSPI();
void static bootOLED(); static void bootOLED();
void static bootPins(); static void bootPins();
void static bootPowerSaving(); static void bootPowerSaving();
}; };
#endif #endif