--- /dev/null
+/** @file\r
+ Declarations and macros for the console abstraction.\r
+\r
+ Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available\r
+ under the terms and conditions of the BSD License which accompanies this\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ Depends on <kfile.h>, <Device/Device.h>, <Protocol/SimpleTextIn.h>, <Uefi/UefiBaseType.h>\r
+**/\r
+#ifndef _DEVICE_UEFI_CONSOLE_H\r
+#define _DEVICE_UEFI_CONSOLE_H\r
+\r
+#include <kfile.h>\r
+#include <Device/Device.h>\r
+\r
+typedef struct {\r
+ UINT32 Column;\r
+ UINT32 Row;\r
+} CursorXY;\r
+\r
+typedef union {\r
+ UINT64 Offset;\r
+ CursorXY XYpos;\r
+} XYoffset;\r
+\r
+/* The members Cookie through Abstraction, inclusive, are the same type and order\r
+ for all instance structures.\r
+\r
+ All instance structures must be a multiple of sizeof(UINTN) bytes long\r
+*/\r
+typedef struct {\r
+ UINT32 Cookie; ///< Special value identifying this as a valid ConInstance\r
+ UINT32 InstanceNum; ///< Which instance is this? Zero-based.\r
+ EFI_HANDLE Dev; ///< Pointer to either Input or Output Protocol.\r
+ DeviceNode *Parent; ///< Points to the parent Device Node.\r
+ struct fileops Abstraction; ///< Pointers to functions implementing this device's abstraction.\r
+ UINTN Reserved_1; // Ensure that next member starts on an 8-byte boundary\r
+ UINT64 NumRead; ///< Number of characters Read.\r
+ UINT64 NumWritten; ///< Number of characters Written.\r
+ EFI_INPUT_KEY UnGetKey; ///< One-key pushback, for poll().\r
+ UINT32 Reserved_2; // Force the struct to be a multiple of 8-bytes long\r
+} ConInstance;\r
+\r
+__BEGIN_DECLS\r
+\r
+int\r
+EFIAPI\r
+da_ConOpen(\r
+ IN struct __filedes *filp,\r
+ IN void *DevInstance,\r
+ IN CHAR16 *Path,\r
+ IN CHAR16 *Flags\r
+);\r
+\r
+__END_DECLS\r
+\r
+#endif /* _DEVICE_UEFI_CONSOLE_H */\r