1234567891011121314151617181920212223242526272829303132333435363738 |
- #include "CM_LIB.h"
- #include "CM_I2C.h"
- #include "CM_I2C_L.h"
- #include <unistd.h>
- #include <stdio.h>
- #include "linux/fcntl.h"
- #include "driver.h"
- #include <string.h>
- uint8_t cm_ReadCommand(uint8_t * pucInsBuff, uint8_t * pucRetVal, uint8_t ucLen)
- {
- uint8_t ucReturn;
-
- if(ucLen < 1)
- {
- printf("Invalid ucLen %d\n", ucLen);
- return -1;
- }
- if ((ucReturn = CM_LOW_LEVEL.SendCommand(pucInsBuff)) != SUCCESS) return ucReturn;
- ucReturn = CM_LOW_LEVEL.ReceiveRet(pucRetVal, ucLen);
-
-
-
-
-
-
-
- return ucReturn;
- }
|