Root/
Source at commit 2920 created 5 years 9 months ago. By ifabio, typo | |
---|---|
1 | /*␊ |
2 | *Copyright (c) 2000 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | *@APPLE_LICENSE_HEADER_START@␊ |
5 | *␊ |
6 | *The contents of this file constitute Original Code as defined in and␊ |
7 | *are subject to the Apple Public Source License Version 1.1 (the␊ |
8 | *"License"). You may not use this file except in compliance with the␊ |
9 | *License. Please obtain a copy of the License at␊ |
10 | *http://www.apple.com/publicsource and read it before using this file.␊ |
11 | *␊ |
12 | *This Original Code and all software distributed under the License are␊ |
13 | *distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
14 | *EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
15 | *INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
16 | *FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the␊ |
17 | *License for the specific language governing rights and limitations␊ |
18 | *under the License.␊ |
19 | *␊ |
20 | *@APPLE_LICENSE_HEADER_END@␊ |
21 | */␊ |
22 | ␊ |
23 | /* ␊ |
24 | * IOSerialDriverSync.h␊ |
25 | * This file contains the abstract parent class for any IOSerialDriver␊ |
26 | * interface, which is a generic serial interface, designed for devices␊ |
27 | * that do character oriented transfers (async) rather than block or␊ |
28 | * packet transfers. Most notably RS-232, Printer, Mouse, and Keyboard␊ |
29 | * type devices.␊ |
30 | *␊ |
31 | * 2000-10-21␉gvdl␉Initial real change to IOKit serial family.␊ |
32 | */␊ |
33 | ␊ |
34 | #ifndef _SERIAL_IOSERIALDRIVERSYNC_H␊ |
35 | #define _SERIAL_IOSERIALDRIVERSYNC_H␊ |
36 | ␊ |
37 | #include <IOKit/IOService.h>␊ |
38 | ␊ |
39 | class IOSerialDriverSync : public IOService␊ |
40 | {␊ |
41 | OSDeclareAbstractStructors(IOSerialDriverSync);␊ |
42 | ␊ |
43 | public:␊ |
44 | virtual IOReturn acquirePort(bool sleep, void *refCon) = 0;␊ |
45 | ␊ |
46 | virtual IOReturn releasePort(void *refCon) = 0;␊ |
47 | ␊ |
48 | virtual IOReturn setState(UInt32 state, UInt32 mask, void *refCon) = 0;␊ |
49 | ␊ |
50 | virtual UInt32 getState(void *refCon) = 0;␊ |
51 | ␊ |
52 | virtual IOReturn watchState(UInt32 *state, UInt32 mask, void *refCon) = 0;␊ |
53 | ␊ |
54 | virtual UInt32 nextEvent(void *refCon) = 0;␊ |
55 | ␊ |
56 | virtual IOReturn executeEvent(UInt32 event, UInt32 data, void *refCon) = 0;␊ |
57 | ␊ |
58 | virtual IOReturn requestEvent(UInt32 event, UInt32 *data, void *refCon) = 0;␊ |
59 | ␊ |
60 | virtual IOReturn enqueueEvent(UInt32 event, UInt32 data,␊ |
61 | bool sleep, void *refCon) = 0;␊ |
62 | ␊ |
63 | virtual IOReturn dequeueEvent(UInt32 *event, UInt32 *data,␊ |
64 | bool sleep, void *refCon) = 0;␊ |
65 | ␊ |
66 | virtual IOReturn enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count,␊ |
67 | bool sleep, void *refCon) = 0;␊ |
68 | ␊ |
69 | virtual IOReturn dequeueData(UInt8 *buffer, UInt32 size, UInt32 *count,␊ |
70 | UInt32 min, void *refCon) = 0;␊ |
71 | ␊ |
72 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 0);␊ |
73 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 1);␊ |
74 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 2);␊ |
75 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 3);␊ |
76 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 4);␊ |
77 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 5);␊ |
78 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 6);␊ |
79 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 7);␊ |
80 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 8);␊ |
81 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 9);␊ |
82 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 10);␊ |
83 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 11);␊ |
84 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 12);␊ |
85 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 13);␊ |
86 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 14);␊ |
87 | OSMetaClassDeclareReservedUnused(IOSerialDriverSync, 15);␊ |
88 | ␊ |
89 | };␊ |
90 | ␊ |
91 | #endif /* !_SERIAL_IOSERIALDRIVERSYNC_H */␊ |
92 |