mirror of https://github.com/MLXXXp/Arduboy2.git
move utils back into begin() until we have more
This commit is contained in:
parent
eb5fb39e28
commit
c25668de0e
|
@ -26,8 +26,12 @@ void Arduboy::start() // deprecated
|
||||||
|
|
||||||
void Arduboy::begin()
|
void Arduboy::begin()
|
||||||
{
|
{
|
||||||
boot(); // required
|
boot();
|
||||||
bootUtils();
|
|
||||||
|
if(pressed(UP_BUTTON)) {
|
||||||
|
flashlight();
|
||||||
|
}
|
||||||
|
|
||||||
bootLogo();
|
bootLogo();
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
|
@ -38,7 +42,7 @@ void Arduboy::begin()
|
||||||
|
|
||||||
void Arduboy::beginMinimal()
|
void Arduboy::beginMinimal()
|
||||||
{
|
{
|
||||||
boot(); // required
|
boot();
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
tunes.initChannel(PIN_SPEAKER_1);
|
tunes.initChannel(PIN_SPEAKER_1);
|
||||||
|
@ -57,13 +61,6 @@ void Arduboy::flashlight()
|
||||||
setRGBled(0,0,0);
|
setRGBled(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Arduboy::bootUtils()
|
|
||||||
{
|
|
||||||
if(pressed(UP_BUTTON)) {
|
|
||||||
flashlight();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Arduboy::bootLogo()
|
void Arduboy::bootLogo()
|
||||||
{
|
{
|
||||||
// setRGBled(10,0,0);
|
// setRGBled(10,0,0);
|
||||||
|
|
|
@ -44,6 +44,12 @@ public:
|
||||||
/// Initializes the hardware
|
/// Initializes the hardware
|
||||||
void begin();
|
void begin();
|
||||||
/// Initializes the hardware (no logo, no other bootime niceities)
|
/// Initializes the hardware (no logo, no other bootime niceities)
|
||||||
|
/**
|
||||||
|
* If you want to build your own customized boot sequence compare
|
||||||
|
* begin() with beginMinimal() and just add back the things you wish
|
||||||
|
* to have in your own sequence, leaving out the things you do not
|
||||||
|
* desire.
|
||||||
|
**/
|
||||||
void beginMinimal();
|
void beginMinimal();
|
||||||
void start() __attribute__ ((deprecated("use begin() instead")));
|
void start() __attribute__ ((deprecated("use begin() instead")));
|
||||||
|
|
||||||
|
@ -59,9 +65,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void flashlight();
|
void flashlight();
|
||||||
|
|
||||||
/// Boot utility detection (such as flashlight, etc.)
|
|
||||||
void inline bootUtils() __attribute__((always_inline));
|
|
||||||
|
|
||||||
/// Clears display.
|
/// Clears display.
|
||||||
void clear();
|
void clear();
|
||||||
void clearDisplay() __attribute__ ((deprecated("use clear() instead")));
|
void clearDisplay() __attribute__ ((deprecated("use clear() instead")));
|
||||||
|
|
Loading…
Reference in New Issue