DFU functions for the communication interface.
These communication functions have to be re-implemented in the user's code.
Functions | |
cy_en_dfu_status_t | Cy_DFU_TransportRead (uint8_t buffer[], uint32_t size, uint32_t *count, uint32_t timeout) |
This function must be implemented in the user's code. More... | |
cy_en_dfu_status_t | Cy_DFU_TransportWrite (uint8_t buffer[], uint32_t size, uint32_t *count, uint32_t timeout) |
This function must be implemented in the user's code. More... | |
void | Cy_DFU_TransportReset (void) |
This function must be implemented in the user's code. More... | |
void | Cy_DFU_TransportStart (cy_en_dfu_transport_t transport) |
This function must be implemented in the user's code. More... | |
void | Cy_DFU_TransportStop (void) |
This function must be implemented in the user's code. More... | |
cy_en_dfu_status_t Cy_DFU_TransportRead | ( | uint8_t | buffer[], |
uint32_t | size, | ||
uint32_t * | count, | ||
uint32_t | timeout | ||
) |
This function must be implemented in the user's code.
This function receives a command packet from the DFU Host via the communication channel. The function waits for a timeout until all bytes are received.
buffer | The pointer to a buffer to store a received command. |
size | The number of bytes to read. |
count | The pointer to the variable that contains the number of received bytes. |
timeout | The time to wait before the function returns because of a timeout, in milliseconds. |
cy_en_dfu_status_t Cy_DFU_TransportWrite | ( | uint8_t | buffer[], |
uint32_t | size, | ||
uint32_t * | count, | ||
uint32_t | timeout | ||
) |
This function must be implemented in the user's code.
This function transmits a response packet to the DFU host via the communication channel. The function waits for a timeout until all bytes are sent.
buffer | The pointer response packet buffer. |
size | The number of bytes to transmit. |
count | The pointer to the actual number of transmitted bytes. |
timeout | The time to wait before the function returns because of a timeout, in milliseconds |
void Cy_DFU_TransportReset | ( | void | ) |
This function must be implemented in the user's code.
Resets the communication interface with clearing buffers, offsets, length, etc.
void Cy_DFU_TransportStart | ( | cy_en_dfu_transport_t | transport | ) |
This function must be implemented in the user's code.
Starts the communication interface through which updating will be working.
transport | defines transport interface to use. See cy_en_dfu_transport_t for available options |
void Cy_DFU_TransportStop | ( | void | ) |
This function must be implemented in the user's code.
Stops the communication interface through which updating will be working.