CM_WRITE.c 570 B

12345678910111213141516
  1. // Mid Level Utility Function: cm_WriteCommand()
  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_WriteCommand(uint8_t* pucInsBuff, uint8_t* pucSendVal, uint8_t ucLen)
  9. {
  10. uint8_t ucReturn;
  11. if ((ucReturn = CM_LOW_LEVEL.SendCommand(pucInsBuff)) != SUCCESS) return ucReturn;
  12. return CM_LOW_LEVEL.SendData(pucSendVal, ucLen);
  13. }