12345678910111213141516171819202122232425262728293031323334 |
- #include "CM_LIB.h"
- #include "CM_I2C.h"
- #include "CM_I2C_L.h"
- #include "CM_GPA.h"
- uint8_t cm_ReadConfigZone(uint8_t ucCryptoAddr, uint8_t * pucBuffer, uint8_t ucCount)
- {
- uint8_t ucReturn, ucEncrypt;
- ucCM_InsBuff[0] = 0xb6;
- ucCM_InsBuff[1] = 0x00;
- ucCM_InsBuff[2] = ucCryptoAddr;
- ucCM_InsBuff[3] = ucCount;
-
-
- cm_GPAcmd2(ucCM_InsBuff);
-
-
- if ((ucReturn = cm_ReadCommand(ucCM_InsBuff, pucBuffer, ucCount)) != SUCCESS) return ucReturn;
-
-
- ucEncrypt = ((ucCryptoAddr>= CM_PSW) && ucCM_Encrypt);
-
- cm_GPAdecrypt(ucEncrypt, pucBuffer, ucCount);
-
- return SUCCESS;
- }
|