mirror of https://github.com/MLXXXp/Arduboy2.git
rename internal core boot utils for consistency
This commit is contained in:
parent
c081d281fe
commit
f41441fe68
|
@ -90,7 +90,7 @@ ArduboyCore::ArduboyCore() {}
|
||||||
void ArduboyCore::boot()
|
void ArduboyCore::boot()
|
||||||
{
|
{
|
||||||
#if F_CPU == 8000000L
|
#if F_CPU == 8000000L
|
||||||
slowCPU();
|
bootCPUSpeed();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SPI.begin();
|
SPI.begin();
|
||||||
|
@ -102,13 +102,13 @@ void ArduboyCore::boot()
|
||||||
safeMode();
|
safeMode();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
saveMuchPower();
|
bootPowerSaving();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if F_CPU == 8000000L
|
#if F_CPU == 8000000L
|
||||||
// if we're compiling for 8Mhz we need to slow the CPU down because the
|
// if we're compiling for 8Mhz we need to slow the CPU down because the
|
||||||
// hardware clock on the Arduboy is 16MHz
|
// hardware clock on the Arduboy is 16MHz
|
||||||
void ArduboyCore::slowCPU()
|
void ArduboyCore::bootCPUSpeed()
|
||||||
{
|
{
|
||||||
uint8_t oldSREG = SREG;
|
uint8_t oldSREG = SREG;
|
||||||
cli(); // suspend interrupts
|
cli(); // suspend interrupts
|
||||||
|
@ -188,7 +188,7 @@ void ArduboyCore::idle()
|
||||||
sleep_mode();
|
sleep_mode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArduboyCore::saveMuchPower()
|
void ArduboyCore::bootPowerSaving()
|
||||||
{
|
{
|
||||||
power_adc_disable();
|
power_adc_disable();
|
||||||
power_usart0_disable();
|
power_usart0_disable();
|
||||||
|
|
|
@ -286,8 +286,8 @@ protected:
|
||||||
// internals
|
// internals
|
||||||
void static inline bootOLED() __attribute__((always_inline));
|
void static inline bootOLED() __attribute__((always_inline));
|
||||||
void static inline bootPins() __attribute__((always_inline));
|
void static inline bootPins() __attribute__((always_inline));
|
||||||
void static inline slowCPU() __attribute__((always_inline));
|
void static inline bootCPUSpeed() __attribute__((always_inline));
|
||||||
void static inline saveMuchPower() __attribute__((always_inline));
|
void static inline bootPowerSaving() __attribute__((always_inline));
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue