EmbeddedExternalDevice.h 1.8 KB

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