API Guide Home (Online version only) |

# palmOneHiResTimerCommon.h

Go to the documentation of this file.

    00001 /*******************************************************************************
    00002  * Copyright (c) 2004-2005 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  ******************************************************************************/
    00005 /**
    00006  * @defgroup    HiRes Hi-Resolution Timer Library
    00007  * @brief       This library provides support for high resolution timer on Palm OS
    00008  *              devices.
    00009  *
    00010  * Applications which would like to use a more granular (higher resolution) timer
    00011  * than the standard Palm OS sysTicksPerSecond() can use this library to do so.
    00012  *
    00013  * @{
    00014  * @}
    00015  */
    00016 /**
    00017  * @ingroup HiRes
    00018  */
    00019
    00020 /**
    00021  * @file    palmOneHiResTimerCommon.h
    00022  * @version 1.0
    00023  * @brief   Public 68k common header file for Hi-Resolution Timer API.
    00024  *
    00025  * This file contains the common library constants and error codes.
    00026  * <hr>
    00027  */
    00028
    00029 #ifndef _PALMONEHIRESTIMERCOMMON_H_
    00030 #define _PALMONEHIRESTIMERCOMMON_H_
    00031
    00032 #include <PalmTypes.h>
    00033 #include <ErrorBase.h>
    00034 #include <SystemMgr.h>
    00035
    00036
    00037 /***********************************************************************
    00038  * Type and creator of the Library
    00039  ***********************************************************************/
    00040
    00041 #define     kHiResTimeLibType       'libr'              /**< Hi-Res timer library database type */
    00042 #define     kHiResTimeLibCreator    'pHRT'              /**< Hi-Res timer library database creator */
    00043
    00044 /***********************************************************************
    00045  * Internal library name which can be passed to SysLibFind()
    00046  ***********************************************************************/
    00047
    00048 #define     kHiResTimeLibName       "HRTimer-Lib"   /**< Hi-Res timer library name */
    00049
    00050 /***********************************************************************
    00051  * Library versioning
    00052  ***********************************************************************/
    00053
    00054 /**
    00055  * @name Library Versions
    00056  */
    00057 /*@{*/
    00058 #define     kHiResTimeLibVersion1   sysMakeROMVersion(1, 0, 0, sysROMStageRelease, 0) /**< Hi-Res timer library version 1 */
    00059 #define     kHiResTimeLibVersion2   sysMakeROMVersion(2, 0, 0, sysROMStageRelease, 0) /**< Hi-Res timer library version 2 */
    00060 #define     kHiResTimeLibVersion    kCamLibVersion2 /**< Hi-Res timer library version 2 */
    00061 /*@}*/
    00062
    00063 /***********************************************************************
    00064  * HiRes Timer result codes
    00065  ***********************************************************************/
    00066
    00067 /**
    00068  * @name Error Codes
    00069  */
    00070 /*@{*/
    00071 /** Hi-Res timer base error number */
    00072 #define kHiResTimeErrorClass            (oemErrorClass + 0x100)
    00073 /** Bad Parameter */
    00074 #define kHiResTimeLibErrBadParam        (kHiResTimeErrorClass | 0x01)
    00075 /** Library is not open */
    00076 #define kHiResTimeLibErrNotOpen         (kHiResTimeErrorClass | 0x02)
    00077 /** Returned from HRTimeLibClose() if the library is still open */
    00078 #define kHiResTimeLibErrStillOpen       (kHiResTimeErrorClass | 0x03)
    00079 /** Fucntion not availabe - If returned by HRTimeLibOpen, there is no HiRes Timer available. */
    00080 #define kHiResTimeLibErrNotAvailable    (kHiResTimeErrorClass | 0x04)
    00081 /*@}*/
    00082
    00083 /***********************************************************************
    00084  * Library trap
    00085  ***********************************************************************/
    00086
    00087 /**
    00088  * @name Function Traps
    00089  */
    00090 /*@{*/
    00091 #define kHRLibTrapTimerTicksPerSecond   (sysLibTrapCustom)
    00092 #define kHRLibTrapTimerGetTime          (sysLibTrapCustom+1)
    00093 /*@}*/
    00094
    00095 #endif  // _PALMONEHIRESTIMERCOMMON_H_

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:54 2008 for Palm API Guide