Power/voltage methods.
More...
◆ busy()
| void OSCR::Power::busy |
( |
| ) |
|
|
extern |
◆ cartridgeEnabled()
| bool OSCR::Power::cartridgeEnabled |
( |
| ) |
|
|
extern |
Check if the cartridge power rail is enabled.
◆ checkVoltage()
| bool OSCR::Power::checkVoltage |
( |
Voltage | voltage | ) |
|
|
extern |
Get the current voltage using the voltage monitors.
◆ disableCartridge()
| void OSCR::Power::disableCartridge |
( |
| ) |
|
|
extern |
Disable the cartridge power rail.
◆ enableCartridge()
| bool OSCR::Power::enableCartridge |
( |
bool | abortIncorrectVoltage = true | ) |
|
|
extern |
Enable the cartridge power rail.
◆ getVoltage()
| Voltage OSCR::Power::getVoltage |
( |
| ) |
|
|
extern |
Get the current voltage reading.
◆ getVoltageSelect()
| Voltage OSCR::Power::getVoltageSelect |
( |
| ) |
|
|
extern |
Get the current voltage output from VSELECT (TPS2113).
◆ idle()
| void OSCR::Power::idle |
( |
| ) |
|
|
extern |
Check the idle timer and enter sleep if idle for long enough.
◆ setVoltage()
Adjust the voltage and/or clock prescaler, if enabled.
- Parameters
-
| newVoltage | The voltage to set. |
Without VSELECT Without VSELECT, this will prompt the user to set the voltage switch to the specified voltage. If the 3V3 fix is enabled, the prompt happens before the clock change when switching to 5V, or after the clock change when switching to 3.3V.
With VSELECT When changing to 5V the voltage is set first so that the MPU will be stable at 16MHz. When going down to 3.3V the clock is changed to 8MHz first so that the MPU will be stable when the voltage is changed to 3.3V.
- Note
- 3V3FIX works best with VSELECT as the firmware controls the timing of all of this. If you are doing this manually, then you'll need to start the OSCR with 5V set and only switch to 3.3V once prompted.
◆ sleep()
| void OSCR::Power::sleep |
( |
| ) |
|
|
extern |
◆ sleeping()
| bool OSCR::Power::sleeping |
( |
| ) |
|
|
extern |
Check if we are sleeping.
◆ voltagesOk()
| bool OSCR::Power::voltagesOk |
( |
| ) |
|
|
extern |
Check if the voltages of the power rails are valid.
◆ wake()
| void OSCR::Power::wake |
( |
| ) |
|
|
extern |
◆ wakeEvent()
| bool OSCR::Power::wakeEvent |
( |
| ) |
|
|
extern |
If sleeping, wake and return true, else false.