Added the setCpuFreq() method to change the cpu clock at run time
This commit is contained in:
parent
e7cf2fa020
commit
1db65be493
@ -45,3 +45,8 @@ PowerManager::PowerInfo PowerManager::getPowerInfo(const uint16_t nbOfMeasures)
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
bool PowerManager::setCpuFreq(uint8_t frequency)
|
||||
{
|
||||
return system_update_cpu_freq(frequency);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "definition.h"
|
||||
#include <user_interface.h>
|
||||
|
||||
class PowerManager
|
||||
{
|
||||
@ -20,6 +21,7 @@ class PowerManager
|
||||
~PowerManager();
|
||||
|
||||
PowerManager::PowerInfo getPowerInfo(const uint16_t nbOfMeasures = 5) const;
|
||||
bool setCpuFreq(uint8_t frequency);
|
||||
protected:
|
||||
PowerManager();
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user