Read/Write Data IO Control Values

group group_dfu_macro_ioctl

The values of the ctl parameter to the Cy_DFU_ReadData() and Cy_DFU_WriteData() functions.

  • Bit 0:

    • 0, Normal read or write operations.

    • 1, Erase a memory page for write operations. Compare a memory page with the data in the buffer for read operation.

  • Bit 1:

    • 0, Read or write with raw data

    • 1, Data received from/to be sent to the DFU Host. May require encryption/decryption or any other special treatment. E.g. read/write a data from/to an address with an offset.

  • Bit 2: Reserved.

  • Bit 3: Reserved.

  • Bit 4 - 31: Unused in DFU SDK. Up to the user to specify it.

Defines

CY_DFU_IOCTL_READ

Read data into the buffer.

CY_DFU_IOCTL_COMPARE

Compare read data with the data in the buffer.

CY_DFU_IOCTL_WRITE

Write the buffer to communication.

CY_DFU_IOCTL_ERASE

Erase memory page.

CY_DFU_IOCTL_BHP

Data from/to DFU Host.

It may require decryption.