Files
buzzer/user/ESP.h
2018-02-03 16:55:37 +01:00

17 lines
215 B
C++
Executable File

#ifndef ESP_H
#define ESP_H
class ESP {
public:
static inline uint32_t getCycleCount() {
uint32_t ccount;
__asm__ __volatile__("esync; rsr %0,ccount":"=a" (ccount));
return ccount;
}
};
#endif // ESP_H