cebf746
Dependents: CEBF746_Master CEBF746_Slave_withTPM CEBF746_Master_New
lib_CEBF746.h
- Committer:
- gandol2
- Date:
- 2016-10-17
- Revision:
- 5:e805b956e247
- Parent:
- 4:e6deb52fd1f7
- Child:
- 6:f1ec76e536ef
File content as of revision 5:e805b956e247:
#ifndef _CUBE_CEBF746_H_ #define _CUBE_CEBF746_H_ /* CEBF716_FUNCTION */ typedef enum { FUNC_STATUS_REG = 0x01, // status reg function FUNC_COMMAND_IO = 0x02, // command function } CEBF716_FUNCTION; /* CEBF716_COMMAND_OPCODE */ typedef enum { COMMAND_OPCODE_ENCRYPT = 0x1, // encrypt command COMMAND_OPCODE_DECRYPT = 0x02, // decrypt command COMMAND_OPCODE_TEST = 0xAA, // test command } CEBF716_COMMAND_OPCODE; /* CEBF716_COMMAND_RETURN_CODE */ typedef enum { SUCESS = 0x00, // No errors } CEBF716_COMMAND_RETURN_CODE; typedef struct _spiDataStr{ uint16_t size; // buf size uint8_t *buf; uint16_t crc16; // crc16 = crc(size(2) + buf(?)) } spiDataStr; void cebf746_print_packet(spiDataStr* in); #endif /* _CUBE_CEBF746_H_ */