I2CAPI.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. * i2capi.h
  16. * I2C access Api's.
  17. *
  18. * Author: Govind Kothandapani <govindk@ami.com>
  19. ******************************************************************/
  20. #ifndef I2CAPI_H
  21. #define I2CAPI_H
  22. #include "Types.h"
  23. /*----------------------------------------------------------------
  24. * @fn API_ReadWriteI2C
  25. * @brief Call this function to read & write to the I2C bus.
  26. * @param Bus - I2C bus to read/write to.
  27. * @param SlaveID - Slave address of the device to read/write to.
  28. * @param NumWrite - Number of bytes to write.
  29. * @param pWriteBuf - Pointer to the buffer to write from.
  30. * @param NumRead - Number of bytes to read.
  31. * @param pReadBuf - Pointer to the buffer to read to.
  32. * @return 0 if success.
  33. * -1 if failed.
  34. *----------------------------------------------------------------*/
  35. extern int API_ReadWriteI2C (INT8U Bus, INT8U SlaveID,
  36. INT8U NumWrite, _NEAR_ INT8U* WriteBuf,
  37. INT8U NumRead, _NEAR_ INT8U* ReadBuf);
  38. #endif /* I2CAPI_H */