forgot to commit everything...
This commit is contained in:
16
user/ESP.h
Executable file
16
user/ESP.h
Executable file
@@ -0,0 +1,16 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user