CM_RDFUZE.c 564 B

123456789101112131415161718192021222324252627
  1. // Read Fuze Byte
  2. //
  3. // CryptoMemory Library Include Files
  4. #include "CM_LIB.h"
  5. #include "CM_I2C.h"
  6. #include "CM_I2C_L.h"
  7. #include "CM_GPA.h"
  8. uint8_t ucCmdRdFuze[4] = {0xb6, 0x01, 0x00, 0x01};
  9. // Read Fuse Byte
  10. uint8_t cm_ReadFuse(uint8_t * pucFuze)
  11. {
  12. uint8_t ucReturn;
  13. // 5 0x00, A2 (0x00), 5 0x00, N (0x01)
  14. cm_GPAGenNF(11, 0x01);
  15. if((ucReturn = cm_ReadCommand(ucCmdRdFuze,pucFuze,1)) != SUCCESS) return ucReturn;
  16. cm_GPAGen(*pucFuze); // fuze byte
  17. cm_GPAGenN(5); // 5 0x00s
  18. return SUCCESS;
  19. }