- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi team
i read the data from master but i am unable to write the read data,please find the below code.
please help me as soon as possible
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#define BUFFER_SIZE (10u)
uint8 rxBuffer [BUFFER_SIZE];
uint8 txBuffer [BUFFER_SIZE];
int main(void)
{
uint8 i;
CyGlobalIntEnable; /* Enable global interrupts. */
SPIS_Start();
SPIS_WriteTxDataZero(0x00);
while(!(SPIS_ReadStatus() & SPIS_STS_TX_FIFO_EMPTY));
SPIS_WriteTxData(rxBuffer);
while(!(SPIS_ReadStatus() & SPIS_STS_TX_FIFO_EMPTY));
LCD_Start();
while(0u == (SPIS_ReadTxStatus() & SPIS_STS_SPI_DONE))
{
}
for(i=0u; i<BUFFER_SIZE; i++)
{
rxBuffer = SPIS_ReadRxData();
LCD_Position(1u,0u);
LCD_PrintHexUint8(rxBuffer);
}
//SPIS_WriteTxData(0x13);
for(;;)
{
/* Place your application code here. */
}
}
/* [] END OF FILE */
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you please provide us with the project