diff --git a/c8_remote/include/bootrom_addr.h b/c8_remote/include/bootrom_addr.h index 9150529..e68ccc0 100644 --- a/c8_remote/include/bootrom_addr.h +++ b/c8_remote/include/bootrom_addr.h @@ -11,6 +11,7 @@ /* Timing */ #define ADDR_CLOCK_GATE 0x100009d4c #define ADDR_GET_TIME 0x10000b0e0 +#define ADDR_GET_TICKS 0x10000041c #define ADDR_TIMER_REGISTER_INT 0x10000b874 #define ADDR_WFI 0x1000004fc diff --git a/c8_remote/lib/payload/include/bootrom_func.h b/c8_remote/lib/payload/include/bootrom_func.h index 2c8a2c0..1bcde39 100644 --- a/c8_remote/lib/payload/include/bootrom_func.h +++ b/c8_remote/lib/payload/include/bootrom_func.h @@ -24,6 +24,11 @@ static inline unsigned long long get_time() return ((BOOTROM_FUNC_ULL) ADDR_GET_TIME)(); } +static inline unsigned long long get_ticks() +{ + return ((BOOTROM_FUNC_ULL) ADDR_GET_TICKS)(); +} + static inline void timer_register_int(unsigned long long dl) { ((BOOTROM_FUNC_V) ADDR_TIMER_REGISTER_INT)(dl, ADDR_RANDOM_RET);