/*---------------------------------------------------------------------------* Project: CtrBrom - OS - include File: tick.h Copyright 2008 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Date:: $ $Rev$ $Author$ *---------------------------------------------------------------------------*/ #ifndef BROM_OS_TICK_H_ #define BROM_OS_TICK_H_ #ifdef __cplusplus extern "C" { #endif #include #include #include #ifdef SDK_ARM11 #include #else // SDK_ARM9 #include #endif // SDK_ARM9 //---- unit of tick typedef u64 OSTick; typedef u32 OSTick32; //---- tick APIs extern void osInitTick( void ); extern u64 osGetTick( void ); extern void i_osSetTick( u64 ); //---- conversion tick count <-> real time count #ifdef SDK_ARM11 #define OS_SYSTEM_CLOCK HW_CPU_CLOCK #define OS_TICK_HI_SHIFT 31 // 2の累乗単位でチック管理するのであれば32は指定できない(ロード値0では割り込み発生せず) #define OS_TICK_LO_MASK ((u32)((1ULL<