Hi,Brian,
One more question:
Would you please explain how I can get more than one bytes using:
USCI_A_SPI_receiveData(USCI_A1_BASE);
Take my code as an example:
I would like to get from SPI 15 bytes, give to variable Chip_Reg[15] and then send to PC through USB. below is my code:
for (j=0; j<15; j++)
{
Chip_Reg[j] = USCI_A_SPI_receiveData(USCI_A1_BASE);
__delay_cycles(32);
}
USBCDC_sendDataInBackground(Chip_Reg,15,CDC0_INTFNUM,1);
However, I can only get Chip_Reg[0] and all the others are 0 on terminal.
What is wrong with my code?
Thank you.
One more question:
Would you please explain how I can get more than one bytes using:
USCI_A_SPI_receiveData(USCI_A1_BASE);
Take my code as an example:
I would like to get from SPI 15 bytes, give to variable Chip_Reg[15] and then send to PC through USB. below is my code:
for (j=0; j<15; j++)
{
Chip_Reg[j] = USCI_A_SPI_receiveData(USCI_A1_BASE);
__delay_cycles(32);
}
USBCDC_sendDataInBackground(Chip_Reg,15,CDC0_INTFNUM,1);
However, I can only get Chip_Reg[0] and all the others are 0 on terminal.
What is wrong with my code?
Thank you.