Adjustment hwCPUFrequency() type
This commit is contained in:
@@ -45,8 +45,7 @@ uint8_t hwReadConfig(int adr);
|
||||
int8_t hwSleep(unsigned long ms);
|
||||
int8_t hwSleep(uint8_t interrupt, uint8_t mode, unsigned long ms);
|
||||
int8_t hwSleep(uint8_t interrupt1, uint8_t mode1, uint8_t interrupt2, uint8_t mode2, unsigned long ms);
|
||||
uint16_t hwCPUVoltage();
|
||||
uint16_t hwCPUFrequency();
|
||||
|
||||
#ifdef MY_DEBUG
|
||||
void hwDebugPrint(const char *fmt, ... );
|
||||
#endif
|
||||
|
||||
@@ -152,7 +152,7 @@ uint16_t hwCPUVoltage() {
|
||||
return (1125300UL) / ADC;
|
||||
}
|
||||
|
||||
uint16_t hwCPUFrequency() {
|
||||
uint8_t hwCPUFrequency() {
|
||||
noInterrupts();
|
||||
// setup timer1
|
||||
TIFR1 = 0xFF;
|
||||
|
||||
@@ -113,7 +113,7 @@ uint16_t hwCPUVoltage() {
|
||||
return ESP.getVcc();
|
||||
}
|
||||
|
||||
uint16_t hwCPUFrequency() {
|
||||
uint8_t hwCPUFrequency() {
|
||||
return ESP.getCpuFreqMHz();
|
||||
}
|
||||
|
||||
|
||||
@@ -135,16 +135,6 @@ int8_t hwSleep(uint8_t interrupt1, uint8_t mode1, uint8_t interrupt2, uint8_t mo
|
||||
return -2;
|
||||
}
|
||||
|
||||
uint16_t hwCPUVoltage() {
|
||||
// TODO: not supported
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint16_t hwCPUFrequency() {
|
||||
// TODO: not supported
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef MY_DEBUG
|
||||
void hwDebugPrint(const char *fmt, ... ) {
|
||||
char fmtBuffer[300];
|
||||
|
||||
Reference in New Issue
Block a user