| Electronic Components Datasheet Search |
|
DEV-15573 Datasheet(PDF) 14 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-15573 Datasheet(HTML) 14 Page - SparkFun Electronics |
|
14 / 31 page ![]() This function checks that the count byte received in the most recent message equals countGlobal. Users must call .receiveResponseData and then immediately call this to check the count of the complete message. Output: Boolean True- count received and count calculated match (aka inputBuffer[0] == countGlobal ) False- Count error, message invalid. .checkCrc(boolean debug) This function checks that the CRC bytes received in the most recent message equals calculated CRCs. Users must call .receiveResponseData then call immediately call this to check the CRCs of the complete message. Output: Boolean True- CRC received and CRC calculated match (aka inputBuffer[0] == countGlobal ) False- CRC error, message invalid. .atca_calculate_crc(uint8_t length, uint8_t *data) This function calculates CRC. It was copied directly from the App Note provided from Microchip (*it seems to be their own unique implementation of CRC cacluation.). You're CRC bytes will be located for use at global public variable .crc . Input: length Unassigned 8-bit integer. Length number of bytes in buffer. Input: data Unassigned 8-bit integer. Data to be used in the CRC calculation. .sendCommand(uint8_t command_opcode, uint8_t param1, uint16_t param2, uint8_t *data, size_t length_of_data) Generic function for sending commands to the IC. This function handles creating the "total transmission" to the IC. This contains WORD_ADDRESS_VALUE, COUNT, OPCODE, PARAM1, PARAM2, DATA (optional), and CRCs. Note, it always calls the wake() function, assuming that you have let the IC fall asleep (default 1.7 sec) Note, for anything other than a command (reset, sleep and idle), you need a different "Word Address Value", So those specific transmissions are handled in unique functions. Input: command_opcode Unassigned 8-bit integer. COMMAND_OPCODE_INFO - Return device state information. COMMAND_OPCODE_LOCK - Lock configuration and/or Data and OTP zones. COMMAND_OPCODE_RANDOM - Create and return a random number (32 bytes of data). COMMAND_OPCODE_READ - Return data at a specific zone and address. COMMAND_OPCODE_WRITE - Return data at a specific zone and address. COMMAND_OPCODE_GENKEY - Create a public and/or private key and store it in a slot. COMMAND_OPCODE_NONCE - Generates a nonce for use by a subsequent command. COMMAND_OPCODE_SIGN - Create ECC signature with TempKey and designated private key. COMMAND_OPCODE_VERIFY - Verify an ECDSA (R,S) signature against data and public key. Input: param1 Unassigned 8-bit integer. Unique to each command. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |