pub unsafe extern "C" fn MSS_QSPI_irq_transfer_block(
num_addr_bytes: u8,
tx_buffer: *const c_void,
tx_byte_size: u32,
rd_buffer: *const c_void,
rd_byte_size: u32,
num_idle_cycles: u8,
) -> u8Expand description
//** The MSS_QSPI_irq_transfer_block() function carries out a QSPI transfer with the target memory device using the interrupt method of data transfers. The QSPI transfer characteristics are configured every time a new transfer is initiated. This is a non-blocking function. You must configure the interrupt handler function before calling the MSS_QSPI_irq_transfer_block() function. It enables the interrupts and starts transmitting as many bytes as requested. When the Transmit-Done interrupt event occurs and this driver calls back the interrupt handler function that you previously provided, you get an indication that the actual SPI transmit process is complete. If the transfer includes receiving data from the target memory device, then the receive-available and receive-done interrupts are also enabled by the MSS_QSPI_irq_transfer_block() function. The data is received in the interrupt routine. When the Receive-Done interrupt event occurs, the interrupt handler you provided is called again.
@param num_addr_bytes The num_addr_bytes parameter indicates the number of address bytes to be used while transacting with the target memory device. Depending on the the target memory device, the address within the target memory device can be either 3 or 4 bytes long. You must make sure that you provide the exact same number with which the target memory device is configured.
Note: There will be some command opcodes for which no address needs to be specified. e.g. READ_ID. For such commands the num_addr_bytes parameter must be set to 0x0.
@param target_mem_addr The target_mem_addr parameter is the memory address in the target memory device on which the read/write operation is to be carried out.
@param tx_buffer The tx_buffer parameter is the pointer to the buffer from which the data needs to transmitted to the target QSPI memory.
@param tx_byte_size The tx_byte_size parameter is the exact number of bytes that needs to be transmitted to target memory device.
Note: This parameter must not consider the command opcode and address bytes as part of the data that needs to be transmitted.
@param rd_buffer The rd_buffer parameter is the pointer to the buffer that stores the data returned by the target memory device. This must be correctly set based on the transfer. That is, for the status, readid, and other configuration read commands, this must be set, however for the configuration write commands, this must be NULL.
@param rd_byte_size The rd_byte_size parameter indicates the exact number of bytes that need to be received from the target memory device.
@param num_idle_cycles The num_idle_cycles parameter indicates the number of idle cycles, or dummy clock edges, that must be generated after the address bytes are transmitted and before target memory device starts sending data. This must be correctly set based on the target memory device and the SPI command being used, This may also vary based on the SPI clock and the way the target memory device is configured.
@return The MSS_QSPI_irq_transfer_block() function returns a non-zero value if MSS QSPI is busy completing the previous transfer and does not accept a new transfer. A zero return value indicates successful execution of the MSS_QSPI_irq_transfer_block function.