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