CM_READ.c 574 B

12345678910111213141516
  1. // Mid Level Utility Function: cm_ReadCommand()
  2. //
  3. // Note: this module must be after all low level functions in the library and
  4. // before all high level user function to assure that any reference to
  5. // this function in this library are satistified.
  6. #include "CM_LIB.h"
  7. #include "CM_I2C.h"
  8. uint8_t cm_ReadCommand(uint8_t * pucInsBuff, uint8_t * pucRetVal, uint8_t ucLen)
  9. {
  10. uint8_t ucReturn;
  11. if ((ucReturn = CM_LOW_LEVEL.SendCommand(pucInsBuff)) != SUCCESS) return ucReturn;
  12. return CM_LOW_LEVEL.ReceiveRet(pucRetVal, ucLen);
  13. }