hc
2024-03-22 a0752693d998599af469473b8dc239ef973a012f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/** @file
 
  Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
 
  SPDX-License-Identifier: BSD-2-Clause-Patent
 
**/
 
#ifndef __EMBEDDED_EXTERNAL_DEVICE_H__
#define __EMBEDDED_EXTERNAL_DEVICE_H__
 
//
// Protocol GUID
//
#define EMBEDDED_EXTERNAL_DEVICE_PROTOCOL_GUID { 0x735F8C64, 0xD696, 0x44D0, { 0xBD, 0xF2, 0x44, 0x7F, 0xD0, 0x5A, 0x54, 0x06 }}
 
//
// Protocol interface structure
//
typedef struct _EMBEDDED_EXTERNAL_DEVICE EMBEDDED_EXTERNAL_DEVICE;
 
//
// Function Prototypes
//
typedef
EFI_STATUS
(EFIAPI *EMBEDDED_EXTERNAL_DEVICE_READ) (
    IN  EMBEDDED_EXTERNAL_DEVICE  *This,
    IN  UINTN                       Register,
    IN  UINTN                       Length,
    OUT VOID                        *Buffer
    )
/*++
 
Routine Description:
 
  Read a set of contiguous external device registers.
 
Arguments:
 
  This        - pointer to protocol
  Offset      - starting register number
  Length      - number of bytes to read
  Buffer      - destination buffer
 
Returns:
 
  EFI_SUCCESS - registers read successfully
 
--*/
;
 
typedef
EFI_STATUS
(EFIAPI *EMBEDDED_EXTERNAL_DEVICE_WRITE) (
    IN EMBEDDED_EXTERNAL_DEVICE *This,
    IN UINTN                      Register,
    IN UINTN                      Length,
    IN VOID                       *Buffer
    )
/*++
 
Routine Description:
 
  Write to a set of contiguous external device registers.
 
Arguments:
 
  This        - pointer to protocol
  Offset      - starting register number
  Length      - number of bytes to write
  Buffer      - source buffer
 
Returns:
 
  EFI_SUCCESS - registers written successfully
 
--*/
;
 
struct _EMBEDDED_EXTERNAL_DEVICE {
  EMBEDDED_EXTERNAL_DEVICE_READ      Read;
  EMBEDDED_EXTERNAL_DEVICE_WRITE     Write;
};
 
extern EFI_GUID gEmbeddedExternalDeviceProtocolGuid;
 
#endif  // __EMBEDDED_EXTERNAL_DEVICE_H__