- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
using spi i like to poll for when last bit had been send out of sdo.
I found SPIM_1_ReadTxStatus() and SPIM_1_STS_SPI_DONE but how to combine I had to try and error. Would be nice to have a explanation of the bits avaliable and how to handle in the fucntion header
/*******************************************************************************
* Function Name: SPIM_1_ReadTxStatus
********************************************************************************
*
* Summary:
* Read the Tx status register for the component.
*
* Parameters:
* None.
*
* Return:
* Contents of the Tx status register.
*
* Global variables:
* SPIM_1_swStatusTx - used to store in software status register,
* modified every function call - resets to zero.
*
* Theory:
* Allows the user and the API to read the Tx status register for error
* detection and flow control.
*
* Side Effects:
* Clear Tx status register of the component.
*
* Reentrant:
* No.
*
*******************************************************************************/
while(!(SPIM_1_ReadTxStatus()& SPIM_1_STS_SPI_DONE))
{
CyDelayUs(100);
i--;
if(i == 0)
{
return false;
}
};
Solved! Go to Solution.
- Labels:
-
PSoC Creator & Designer Software
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
May be duplicated with Hari-san's answer.
I usually open the datasheet of a component either
(1) From Configure window (lower left corner)
(2) Component Catalog (When a component is selected, the bottom pane has a link to datasheet)
In the datasheet's Application Programming Interface,
we can find a description of an API
When I clicked the link of "Status Register Bits" I could see
Or, I would directly access SPIM.h in the Generated_Source > SPIM
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can find all the macro definitions in the component datasheet for PSoC 4 and in the PDL documentation for PSoC 6. To access these, you can right-click the component in PSoC Creator and select Open Datasheet (For P4 devices) and Open PDL Documentation for P6 devices.
Best regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
May be duplicated with Hari-san's answer.
I usually open the datasheet of a component either
(1) From Configure window (lower left corner)
(2) Component Catalog (When a component is selected, the bottom pane has a link to datasheet)
In the datasheet's Application Programming Interface,
we can find a description of an API
When I clicked the link of "Status Register Bits" I could see
Or, I would directly access SPIM.h in the Generated_Source > SPIM
moto