uint8_t uccount =0; //To check no. of bytes sent uint8_t *;ucfTx_Buf;//This points to array containing 0xFF 15 times while (uccount != 16) { ADC_SSP_Select();//SSEL pulled low delebrately b4 every transmission if (uccount == 0) { SSP_SendData((LPC_SSPn_Type*)ADC_SSP,0xFF); } else { if (ADC_SSP->SR & SSP_SR_TNF) { SSP_SendData((LPC_SSPn_Type*)ADC_SSP,*ucTx_Buf); ucfTx_Buf++; count++; } } if (( ADC_SSP -> RIS) & SSP_RIS_ROR)//It never goes into this condition { lpc_printf("ROR=%x\r\n",ADC_SSP->RIS ); } if (( USED_SSP_CS55XX -> RIS) & SSP_IMSC_RT)//It never goes into this condition { lpc_printf("RT=%x\r\n",USED_SSP_CS55XX->RIS ); } while(ADC_SSP->SR & SSP_SR_RNE { lpc_printf("R=0x%x\r\n",SSP_ReceiveData((LPC_SSPn_Type*)ADC_SSP)); } } |