API Reference | |
| Application Management | |
| DFU functions for the application management. | |
| Memory Operations | |
| DFU functions for memory operations These IO functions have to be re-implemented in the user's code. | |
| Transport Management | |
| DFU functions for the communication interface. | |
| Custom commands | |
| The DFU protocol provides a set of pre-defined commands. | |
Functions | |
| cy_en_dfu_status_t | Cy_DFU_Init (uint32_t *state, cy_stc_dfu_params_t *params) |
| This function starts the application download and install operations. More... | |
| cy_en_dfu_status_t | Cy_DFU_Continue (uint32_t *state, cy_stc_dfu_params_t *params) |
| The function processes Host Commands according to Host Command/Response Protocol. More... | |
| uint32_t | Cy_DFU_DataChecksum (const uint8_t *address, uint32_t length, cy_stc_dfu_params_t *params) |
| This function computes a CRC-32C for the provided number of bytes contained in the provided buffer. More... | |
| void | Cy_DFU_AddExtMemory (mtb_serial_memory_t *serialMemObj) |
| This function receives and stores an object for external memory. More... | |
| cy_en_dfu_status_t Cy_DFU_Init | ( | uint32_t * | state, |
| cy_stc_dfu_params_t * | params | ||
| ) |
This function starts the application download and install operations.
Make subsequent calls to Cy_DFU_Continue() to continue the process.
Returns immediately, reporting success or failure.
Only one updating operation can be done at a time - the user's code must ensure this.
| state | The pointer to a state variable, that is updated by the function. See DFU State |
| params | The pointer to a DFU parameters structure See cy_stc_dfu_params_t |
| cy_en_dfu_status_t Cy_DFU_Continue | ( | uint32_t * | state, |
| cy_stc_dfu_params_t * | params | ||
| ) |
The function processes Host Commands according to Host Command/Response Protocol.
The function waits for the Host data packet till timeout occurs. If valid packet is received, it decodes received command, processes it and transfer back a response if needed. See description of Host Command/Response Protocol in AN213924 DFU SDK User Guide.
| state | The pointer to a state variable, that is updated by the function. See DFU State. |
| params | The pointer to a DFU parameters structure. See cy_stc_dfu_params_t. |
| uint32_t Cy_DFU_DataChecksum | ( | const uint8_t * | address, |
| uint32_t | length, | ||
| cy_stc_dfu_params_t * | params | ||
| ) |
This function computes a CRC-32C for the provided number of bytes contained in the provided buffer.
This function is used to validate the Program Data and Verify Data DFU commands and a metadata row.
| address | The pointer to a buffer containing the data to compute the checksum for. |
| length | The number of bytes in the buffer to compute the checksum for. |
| params | The pointer to a DFU parameters structure. See cy_stc_dfu_params_t . |
| void Cy_DFU_AddExtMemory | ( | mtb_serial_memory_t * | serialMemObj | ) |
This function receives and stores an object for external memory.
| serialMemObj | The pointer to an object for serial memory middleware |