Mercurial > flash_v2
annotate packages/io/common/current/include/io.h @ 76:435cced73e2f ecos-v1_3_1-release
eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
| author | jlarmour |
|---|---|
| date | Tue, 28 Mar 2000 14:10:45 +0000 |
| parents | bf00f99aec69 |
| children | 6ed91473a1cd |
| rev | line source |
|---|---|
| 2 | 1 #ifndef CYGONCE_IO_H |
| 2 #define CYGONCE_IO_H | |
| 3 // ==================================================================== | |
| 4 // | |
| 5 // io.h | |
| 6 // | |
| 7 // Device I/O | |
| 8 // | |
| 9 // ==================================================================== | |
| 10 //####COPYRIGHTBEGIN#### | |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
11 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
12 // ------------------------------------------- |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
13 // The contents of this file are subject to the Red Hat eCos Public License |
|
66
bf00f99aec69
Merge from eCos master repository on 2000-02-02-19:16:44-GMT
jlarmour
parents:
64
diff
changeset
|
14 // Version 1.1 (the "License"); you may not use this file except in |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
15 // compliance with the License. You may obtain a copy of the License at |
|
66
bf00f99aec69
Merge from eCos master repository on 2000-02-02-19:16:44-GMT
jlarmour
parents:
64
diff
changeset
|
16 // http://www.redhat.com/ |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
17 // |
|
66
bf00f99aec69
Merge from eCos master repository on 2000-02-02-19:16:44-GMT
jlarmour
parents:
64
diff
changeset
|
18 // Software distributed under the License is distributed on an "AS IS" |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
20 // License for the specific language governing rights and limitations under |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
21 // the License. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
22 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
23 // The Original Code is eCos - Embedded Configurable Operating System, |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
24 // released September 30, 1998. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
25 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
26 // The Initial Developer of the Original Code is Red Hat. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
27 // Portions created by Red Hat are |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
28 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
29 // All Rights Reserved. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
30 // ------------------------------------------- |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
31 // |
| 2 | 32 //####COPYRIGHTEND#### |
| 33 // ==================================================================== | |
| 34 //#####DESCRIPTIONBEGIN#### | |
| 35 // | |
| 36 // Author(s): gthomas | |
| 37 // Contributors: gthomas | |
| 38 // Date: 1999-02-04 | |
| 39 // Purpose: Describe low level I/O interfaces. | |
| 40 // Description: | |
| 41 // | |
| 42 //####DESCRIPTIONEND#### | |
| 43 // | |
| 44 // ==================================================================== | |
| 45 | |
| 46 // This file contains the user-level visible I/O interfaces | |
| 47 | |
| 48 #include <pkgconf/system.h> | |
| 49 #include <pkgconf/hal.h> | |
| 50 #include <cyg/infra/cyg_type.h> | |
| 51 | |
| 52 #ifdef CYGPKG_ERROR | |
| 53 #include <cyg/error/codes.h> | |
| 54 #else | |
| 55 #error I/O subsystem requires 'error' package | |
| 56 #endif | |
| 57 | |
| 58 // typedef int Cyg_ErrNo; | |
| 59 | |
| 60 #ifdef __cplusplus | |
| 61 extern "C" { | |
| 62 #endif | |
| 63 | |
| 64 typedef void *cyg_io_handle_t; | |
| 65 | |
| 66 // Lookup a device and return it's handle | |
| 67 Cyg_ErrNo cyg_io_lookup(const char *name, | |
| 68 cyg_io_handle_t *handle); | |
| 69 // Write data to a device | |
| 70 Cyg_ErrNo cyg_io_write(cyg_io_handle_t handle, | |
| 71 const void *buf, | |
| 72 cyg_uint32 *len); | |
| 73 // Read data from a device | |
| 74 Cyg_ErrNo cyg_io_read(cyg_io_handle_t handle, | |
| 75 void *buf, | |
| 76 cyg_uint32 *len); | |
| 77 // Get the configuration of a device | |
| 78 Cyg_ErrNo cyg_io_get_config(cyg_io_handle_t handle, | |
| 79 cyg_uint32 key, | |
| 80 void *buf, | |
| 81 cyg_uint32 *len); | |
| 82 // Change the configuration of a device | |
| 83 Cyg_ErrNo cyg_io_set_config(cyg_io_handle_t handle, | |
| 84 cyg_uint32 key, | |
| 85 const void *buf, | |
| 86 cyg_uint32 *len); | |
| 87 | |
| 88 #ifdef __cplusplus | |
| 89 } | |
| 90 #endif | |
| 91 | |
| 92 #endif /* CYGONCE_IO_H */ | |
| 93 /* EOF io.h */ |
