FRUAPI.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*****************************************************************
  2. *****************************************************************
  3. *** **
  4. *** (C)Copyright 2005-2006, American Megatrends Inc. **
  5. *** **
  6. *** All Rights Reserved. **
  7. *** **
  8. *** 6145-F, Northbelt Parkway, Norcross, **
  9. *** **
  10. *** Georgia - 30071, USA. Phone-(770)-246-8600. **
  11. *** **
  12. *****************************************************************
  13. *****************************************************************
  14. ******************************************************************
  15. *
  16. * FRUAPI.h
  17. * FRU access Api's.
  18. *
  19. * Author: Govind Kothandapani <govindk@ami.com>
  20. *
  21. ******************************************************************/
  22. #ifndef FRUAPI_H
  23. #define FRUAPI_H
  24. #include "Types.h"
  25. /*------------------------------------------------------------------
  26. * @fn GetFRUDeviceSize
  27. * @brief Returns the size of the FRU Device.
  28. * @param DeviceID - FRU Device ID to read from.
  29. * @returns The size of the FRU Device.
  30. * -1 if error.
  31. *------------------------------------------------------------------*/
  32. extern int API_GetFRUDeviceSize (INT8U DeviceID, int BMCInst);
  33. /*------------------------------------------------------------------
  34. * @fn ReadFRUDevice
  35. * @brief Reads data from a FRU Device.
  36. * @param DeviceID - FRU Device ID to read from.
  37. * @param Offset - Offset in the FRU Device to read from.
  38. * @param Len - Number of bytes to read.
  39. * @param pBuf - Buffer to read the contents to.
  40. * @return The number of bytes actually read.
  41. * -1 if error.
  42. *------------------------------------------------------------------*/
  43. extern int API_ReadFRUDevice (INT8U DeviceID, INT16U Offset, INT16U Len, _FAR_ INT8U* pBuf, int BMCInst);
  44. /*------------------------------------------------------------------
  45. * @fn WriteFRUDevice
  46. * @brief Write the data to FRU Device.
  47. * @param DeviceID - FRU Device ID to write to.
  48. * @param Offset - Offset in the FRU Device to write to.
  49. * @param Len - Number of bytes to write.
  50. * @param pBuf - Buffer to write the contents from.
  51. * @return The number of bytes actually written.
  52. * -1 if error.
  53. *------------------------------------------------------------------*/
  54. extern int API_WriteFRUDevice (INT8U DeviceID, INT16U Offset, INT16U Len, _FAR_ INT8U* pBuf, int BMCInst);
  55. #endif /* FRUAPI_H */