OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [ada/] [s-winext.ads] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 281 jeremybenn
------------------------------------------------------------------------------
2
--                                                                          --
3
--                        GNAT RUN-TIME COMPONENTS                          --
4
--                                                                          --
5
--                     S Y S T E M . W I N 3 2 . E X T                      --
6
--                                                                          --
7
--                                 S p e c                                  --
8
--                                                                          --
9
--            Copyright (C) 2009, Free Software Foundation, Inc.            --
10
--                                                                          --
11
-- GNAT is free software;  you can  redistribute it  and/or modify it under --
12
-- terms of the  GNU General Public License as published  by the Free Soft- --
13
-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
14
-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16
-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
17
--                                                                          --
18
-- As a special exception under Section 7 of GPL version 3, you are granted --
19
-- additional permissions described in the GCC Runtime Library Exception,   --
20
-- version 3.1, as published by the Free Software Foundation.               --
21
--                                                                          --
22
-- You should have received a copy of the GNU General Public License and    --
23
-- a copy of the GCC Runtime Library Exception along with this program;     --
24
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
25
-- <http://www.gnu.org/licenses/>.                                          --
26
--                                                                          --
27
-- GNAT was originally developed  by the GNAT team at  New York University. --
28
-- Extensive contributions were provided by Ada Core Technologies Inc.      --
29
--                                                                          --
30
------------------------------------------------------------------------------
31
 
32
--  This package provides the part of the low level Win32 interface which is
33
--  not supported by RTX (but supported by regular Windows platforms).
34
 
35
package System.Win32.Ext is
36
   pragma Pure;
37
 
38
   ---------------------
39
   -- Time Management --
40
   ---------------------
41
 
42
   function QueryPerformanceFrequency
43
     (lpFrequency : access LARGE_INTEGER) return Win32.BOOL;
44
   pragma Import
45
     (Stdcall, QueryPerformanceFrequency, "QueryPerformanceFrequency");
46
 
47
   ---------------
48
   -- Processor --
49
   ---------------
50
 
51
   function SetThreadIdealProcessor
52
     (hThread          : HANDLE;
53
      dwIdealProcessor : ProcessorId) return DWORD;
54
   pragma Import (Stdcall, SetThreadIdealProcessor, "SetThreadIdealProcessor");
55
 
56
   --------------
57
   -- Com Port --
58
   --------------
59
 
60
   DTR_CONTROL_DISABLE : constant := 16#0#;
61
   RTS_CONTROL_DISABLE : constant := 16#0#;
62
   NOPARITY            : constant := 0;
63
   ODDPARITY           : constant := 1;
64
   EVENPARITY          : constant := 2;
65
   ONESTOPBIT          : constant := 0;
66
   TWOSTOPBITS         : constant := 2;
67
 
68
   type DCB is record
69
      DCBLENGTH         : DWORD;
70
      BaudRate          : DWORD;
71
      fBinary           : Bits1;
72
      fParity           : Bits1;
73
      fOutxCtsFlow      : Bits1;
74
      fOutxDsrFlow      : Bits1;
75
      fDtrControl       : Bits2;
76
      fDsrSensitivity   : Bits1;
77
      fTXContinueOnXoff : Bits1;
78
      fOutX             : Bits1;
79
      fInX              : Bits1;
80
      fErrorChar        : Bits1;
81
      fNull             : Bits1;
82
      fRtsControl       : Bits2;
83
      fAbortOnError     : Bits1;
84
      fDummy2           : Bits17;
85
      wReserved         : WORD;
86
      XonLim            : WORD;
87
      XoffLim           : WORD;
88
      ByteSize          : BYTE;
89
      Parity            : BYTE;
90
      StopBits          : BYTE;
91
      XonChar           : CHAR;
92
      XoffChar          : CHAR;
93
      ErrorChar         : CHAR;
94
      EofChar           : CHAR;
95
      EvtChar           : CHAR;
96
      wReserved1        : WORD;
97
   end record;
98
   pragma Convention (C, DCB);
99
   pragma Pack (DCB);
100
 
101
   type COMMTIMEOUTS is record
102
      ReadIntervalTimeout         : DWORD;
103
      ReadTotalTimeoutMultiplier  : DWORD;
104
      ReadTotalTimeoutConstant    : DWORD;
105
      WriteTotalTimeoutMultiplier : DWORD;
106
      WriteTotalTimeoutConstant   : DWORD;
107
   end record;
108
   pragma Convention (C, COMMTIMEOUTS);
109
 
110
   function GetCommState
111
     (hFile : HANDLE;
112
      lpDCB : access DCB) return BOOL;
113
   pragma Import (Stdcall, GetCommState, "GetCommState");
114
 
115
   function SetCommState
116
     (hFile : HANDLE;
117
      lpDCB : access DCB) return BOOL;
118
   pragma Import (Stdcall, SetCommState, "SetCommState");
119
 
120
   function SetCommTimeouts
121
     (hFile          : HANDLE;
122
      lpCommTimeouts : access COMMTIMEOUTS) return BOOL;
123
   pragma Import (Stdcall, SetCommTimeouts, "SetCommTimeouts");
124
 
125
end System.Win32.Ext;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.