1234567891011121314151617181920212223242526272829 |
- #include "CM_LIB.h"
- #include "CM_I2C.h"
- #include "CM_I2C_L.h"
- #include "CM_GPA.h"
- uint8_t ucCmdRdChk[4] = {0xb6, 0x02, 0x00, 0x02};
- uint8_t cm_ReadChecksum(uint8_t * pucChkSum)
- {
- uint8_t ucDCR[1];
- uint8_t ucReturn;
-
- cm_GPAGenN(20);
-
-
- if((ucReturn = cm_ReadCommand(ucCmdRdChk, pucChkSum, 2))!= SUCCESS) return ucReturn;
-
-
- if ((ucReturn = cm_ReadConfigZone(DCR_ADDR, ucDCR, 1)) != SUCCESS) return ucReturn;
- if ((ucDCR[0]&DCR_UCR)) cm_ResetCrypto();
-
- return SUCCESS;
- }
|