home *** CD-ROM | disk | FTP | other *** search
- /*
- File: RTCPlugin.h
-
- Contains: System interface for RTC plugins
-
- Version: Technology: System 8
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __RTCPLUGIN__
- #define __RTCPLUGIN__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #if FOR_SYSTEM8_PREEMPTIVE
- #ifndef __TIMING__
- #include <Timing.h>
- #endif
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- #if FOR_SYSTEM8_PREEMPTIVE
- /*
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- status codes
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- */
-
- enum {
- kRTCPluginVersionOne = 0x01,
- kRTCPluginCurrentVersion = kRTCPluginVersionOne
- };
-
-
- enum {
- kRTCNoError = 0,
- kRTCTimeout = 1,
- kRTCUnexpectedError = 2,
- kRTCMemoryError = 3,
- kRTCParameterError = 4,
- kRTCDeviceError = 5,
- kRTCUnexpectedDeviceRequest = 6,
- kRTCControllerError = 7,
- kRTCConsistencyCheckError = 8
- };
-
- /*
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- Plugin Calls Provided by the Plugin
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- All plugin calls are async.
- The plugin starts the i/o and returns immediately.
- The plugin ISR calls RTCFamRequestComplete() when
- the i/o is completed (see below).
- */
- typedef OSStatus (*RTCPluginHWVerifyPtr)(void );
- typedef OSStatus (*RTCPluginInitPtr)(void );
- typedef OSStatus (*RTCPluginTermPtr)(void );
- typedef OSStatus (*RTCPluginSetPtr)(Nanoseconds newTime);
- typedef OSStatus (*RTCPluginGetPtr)(Nanoseconds *currentTime);
- struct RTCPluginDispatchTable {
- UInt32 version;
- UInt32 reserved[3];
- RTCPluginHWVerifyPtr Verify;
- RTCPluginInitPtr Init;
- RTCPluginTermPtr Term;
- RTCPluginGetPtr Read;
- RTCPluginSetPtr Write;
- };
- typedef struct RTCPluginDispatchTable RTCPluginDispatchTable;
-
- extern OSStatus RTCPluginHWVerify(void );
-
- extern OSStatus RTCPluginInit(void );
-
- extern OSStatus RTCPluginTerm(void );
-
- extern OSStatus RTCPluginSet(Nanoseconds newTime);
-
- extern OSStatus RTCPluginGet(Nanoseconds *currentTime);
-
- /*
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- Plugin Calls Provided by the Family
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- */
- extern void RTCFamRequestComplete(OSStatus status);
-
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __RTCPLUGIN__ */
-
-