]> git.proxmox.com Git - mirror_edk2.git/blame - EmbeddedPkg/Include/Protocol/EblAddCommand.h
Adding support for BeagleBoard.
[mirror_edk2.git] / EmbeddedPkg / Include / Protocol / EblAddCommand.h
CommitLineData
2ef2b01e
A
1/** @file\r
2\r
3 Copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>\r
4\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15/** @file\r
16 Abstraction for hardware based interrupt routine\r
17 \r
18 Copyright (c) 2009 Apple Inc. \r
19 All rights reserved. This program and the accompanying materials\r
20 are licensed and made available under the terms and conditions of the BSD License\r
21 which accompanies this distribution. The full text of the license may be found at\r
22 http://opensource.org/licenses/bsd-license.php\r
23\r
24 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
25 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
26\r
27**/\r
28\r
29\r
30#ifndef __EBL_ADD_COMMAND_H__\r
31#define __EBL_ADD_COMMAND_H__\r
32\r
33\r
34\r
35//\r
36// Protocol GUID\r
37//\r
38// AEDA2428-9A22-4637-9B21-545E28FBB829\r
39\r
40#define EBL_ADD_COMMAND_PROTOCOL_GUID \\r
41 { 0xaeda2428, 0x9a22, 0x4637, { 0x9b, 0x21, 0x54, 0x5e, 0x28, 0xfb, 0xb8, 0x29 } }\r
42\r
43\r
44typedef struct _EBL_ADD_COMMAND_PROTOCOL EBL_ADD_COMMAND_PROTOCOL;\r
45\r
46typedef\r
47EFI_STATUS\r
48(EFIAPI *EBL_COMMMAND) (\r
49 IN UINTN Argc,\r
50 IN CHAR8 **Argv\r
51 );\r
52\r
53typedef struct {\r
54 CHAR8 *Name;\r
55 CHAR8 *HelpSummary;\r
56 CHAR8 *Help;\r
57 EBL_COMMMAND Command;\r
58} EBL_COMMAND_TABLE;\r
59\r
60\r
61/**\r
62 Add a single command table entry.\r
63 \r
64 @param EntryArray Pointer EBL_COMMAND_TABLE of the command that is being added\r
65\r
66**/\r
67typedef\r
68VOID\r
69(EFIAPI *EBL_ADD_COMMAND) (\r
70 IN const EBL_COMMAND_TABLE *Entry\r
71 );\r
72\r
73\r
74/**\r
75 Add a multiple command table entry.\r
76\r
77 @param EntryArray Pointer EBL_COMMAND_TABLE of the commands that are being added\r
78\r
79 @param ArrayCount Nuber of commands in the EntryArray.\r
80\r
81**/\r
82typedef\r
83VOID\r
84(EFIAPI *EBL_ADD_COMMANDS) (\r
85 IN const EBL_COMMAND_TABLE *EntryArray,\r
86 IN UINTN ArrayCount\r
87 );\r
88\r
89\r
90typedef
91VOID
92(EFIAPI *EBL_GET_CHAR_CALL_BACK) (
93 IN UINTN ElapsedTime
94 );
95\r
96/**\r
97 Return a keypress or optionally timeout if a timeout value was passed in.\r
98 An optional callback funciton is called evey second when waiting for a\r
99 timeout.\r
100\r
101 @param Key EFI Key information returned\r
102 @param TimeoutInSec Number of seconds to wait to timeout\r
103 @param CallBack Callback called every second during the timeout wait \r
104\r
105 @return EFI_SUCCESS Key was returned\r
106 @return EFI_TIMEOUT If the TimoutInSec expired\r
107\r
108**/\r
109typedef \r
110EFI_STATUS\r
111(EFIAPI *EBL_GET_CHAR_KEY) (\r
112 IN OUT EFI_INPUT_KEY *Key,\r
113 IN UINTN TimeoutInSec,\r
114 IN EBL_GET_CHAR_CALL_BACK CallBack OPTIONAL\r
115 );\r
116\r
117\r
118/**\r
119 This routine is used prevent command output data from scrolling off the end\r
120 of the screen. The global gPageBreak is used to turn on or off this feature.\r
121 If the CurrentRow is near the end of the screen pause and print out a prompt\r
122 If the use hits Q to quit return TRUE else for any other key return FALSE.\r
123 PrefixNewline is used to figure out if a newline is needed before the prompt\r
124 string. This depends on the last print done before calling this function.\r
125 CurrentRow is updated by one on a call or set back to zero if a prompt is \r
126 needed.\r
127\r
128 @param CurrentRow Used to figure out if its the end of the page and updated\r
129 @param PrefixNewline Did previous print issue a newline\r
130\r
131 @return TRUE if Q was hit to quit, FALSE in all other cases.\r
132\r
133**/\r
134typedef\r
135BOOLEAN\r
136(EFIAPI *EBL_ANY_KEY_CONTINUE_Q_QUIT) (\r
137 IN UINTN *CurrentRow,\r
138 IN BOOLEAN PrefixNewline\r
139 );\r
140\r
141\r
142\r
143struct _EBL_ADD_COMMAND_PROTOCOL {\r
144 EBL_ADD_COMMAND AddCommand;\r
145 EBL_ADD_COMMANDS AddCommands;\r
146\r
147 // Commands to reuse EBL infrastructure\r
148 EBL_GET_CHAR_KEY EblGetCharKey;\r
149 EBL_ANY_KEY_CONTINUE_Q_QUIT EblAnyKeyToContinueQtoQuit;\r
150};\r
151\r
152extern EFI_GUID gEfiEblAddCommandProtocolGuid;\r
153\r
154#endif\r
155\r
156\r