Swadge 2024
2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
coreutil.h
Go to the documentation of this file.
1
26
#ifndef _COREUTIL_H_
27
#define _COREUTIL_H_
28
30
#define STATIC static
31
42
STATIC
inline
uint32_t
getCycleCount
(
void
)
43
{
44
#if defined(__XTENSA__)
45
uint32_t ccount;
46
asm
volatile
(
"rsr %0,ccount"
:
"=a"
(ccount));
47
return
ccount;
48
#else
49
return
0;
50
#endif
51
}
52
53
#endif
STATIC
#define STATIC
Silly redefinition to trick Doxygen into documenting a static function, which it otherwise ignores.
Definition
coreutil.h:30
getCycleCount
STATIC uint32_t getCycleCount(void)
Get current cycle count of processor for profiling. It is in 1/F_CPU units. This will actually compil...
Definition
coreutil.h:42
main
utils
coreutil.h
Generated by
1.10.0