1.1.9.3 QMSPIx_TransferSetup Function
C
// x - Instance of the QMSPI peripheral bool QMSPIx_TransferSetup (QMSPI_TRANSFER_SETUP *setup);
Summary
Setup QMSPI operational parameters as desired by the client.
Description
This function setup QMSPI x with the values needed by the client dynamically. Values passed through setup structure will be the new setup for QMSPI transmission. Even if user is not intending to modify all the setup parameters, he must update his setup structure with all its parameters.
If user do not update all the setup structure elements, then unexpected QMSPI behavior may occur. User need not call this function if he has configured the setup in GUI and there is no dynamic change needed in any of the parameters.
Precondition
QMSPI must first be initialized using QMSPIx_Initialize().
Parameters
Param | Description |
---|---|
*setup | pointer to the data structure of type QMSPI_TRANSFER_SETUP which has the list of elements to be setup for a client. |
Returns
-
true: if setup was successful
-
false: if setup was failed
Example
QMSPI_TRANSFER_SETUP setup; setup.clockFrequency = 1000000; setup.clockPhaseMOSI = QMSPI_CLOCK_PHASE_MOSI_0; setup.clockPhaseMISO = QMSPI_CLOCK_PHASE_MISO_0; setup.clockPolarity = QMSPI_CLOCK_POLARITY_IDLE_LOW; if (QMSPI0_TransferSetup(&setup) == false) { // this means setup could not be done, debug the reason. }
Remarks
User need not call this function if he has configured the setup in GUI and there is no dynamic change needed in any of the parameters.