]>
git.proxmox.com Git - mirror_edk2.git/blob - StdLibPrivateInternalFiles/Include/Device/IIO.h
2 Constants and declarations for the Interactive IO library.
4 Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available
6 under the terms and conditions of the BSD License which accompanies this
7 distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 #ifndef _INTERACTIVE_IO_H
14 #define _INTERACTIVE_IO_H
16 #include <sys/EfiSysCall.h>
17 #include <sys/termios.h>
18 #include <Containers/Fifo.h>
23 typedef struct _IIO_Instance cIIO
;
25 cIIO
* EFIAPI
New_cIIO(void); // Creates a new cIIO structure
27 /* Types of Member functions of the TTY I/O "class". */
28 typedef void (EFIAPI
*cIIO_Delete
) (cIIO
*This
);
30 typedef ssize_t (EFIAPI
*cIIO_Read
) (struct __filedes
*filp
, size_t BufferSize
, VOID
*Buffer
);
32 typedef ssize_t (EFIAPI
*cIIO_Write
) (struct __filedes
*filp
, const char *buf
, ssize_t n
);
34 typedef ssize_t (EFIAPI
*cIIO_Echo
) (struct __filedes
*filp
, wchar_t EChar
, BOOLEAN EchoIsOK
);
36 /** Structure defining an instance of the Interactive I/O "class". **/
37 struct _IIO_Instance
{
38 /* ######## Public Functions ######## */
44 /* ######## PRIVATE Data ######## */
46 // Wide input buffer -- stdin
49 // Wide output buffer -- stdout
52 // Attributes for characters in the output buffer
55 // Wide output buffer -- stderr
58 // Character conversion states for the buffers
62 // Cursor position at beginning of operation
63 // and at each character thereafter.
67 UINTN MaxColumn
; // Width of the output device
68 UINTN MaxRow
; // Height of the output device
71 struct termios Termio
;
75 ssize_t
IIO_CanonRead (struct __filedes
*filp
);
76 ssize_t
IIO_NonCanonRead (struct __filedes
*filp
);
77 ssize_t
IIO_WriteOne (struct __filedes
*filp
, cFIFO
*Buf
, wchar_t InCh
);
78 ssize_t
IIO_EchoOne (struct __filedes
*filp
, wchar_t InCh
, BOOLEAN EchoIsOK
);
81 #endif /* _INTERACTIVE_IO_H */