1234567891011121314151617181920212223242526272829303132333435 |
- #include "CM_LIB.h"
- #include "CM_I2C.h"
- #include "CM_I2C_L.h"
- #include "CM_GPA.h"
- uint8_t cm_WriteSmallZone(uint8_t ucCryptoAddr, uint8_t* pucBuffer, uint8_t ucCount)
- {
- uint8_t ucReturn;
-
- ucCM_InsBuff[0] = 0xb0;
- ucCM_InsBuff[1] = 0x00;
- ucCM_InsBuff[2] = ucCryptoAddr;
- ucCM_InsBuff[3] = ucCount;
-
- cm_GPAcmd2(ucCM_InsBuff);
-
-
- cm_GPAencrypt(ucCM_Encrypt, pucBuffer, ucCount);
-
- ucReturn = cm_WriteCommand(ucCM_InsBuff, pucBuffer,ucCount);
-
- if (ucCM_AntiTearing) CM_LOW_LEVEL.WaitClock(100);
- return ucReturn;
- }
|