pic32/libraries/DSPI/DSPI.cpp
/* ------------------------------------------------------------ */
/***	DSPI::intTransfer
**
**	Parameters:
**		cbReq		- number of bytes to receive
**		bPadT		- pad byte to send to the slave device
**		pbRcv		- pointer to buffer to receive returned bytes
**
**	Return Value:
**		none
**
**	Errors:
**		Overrun error handled by the interrupt service routine
**
**	Description:
**		This function will set up and begin an interrupt driven
**		transfer where there is no transmit buffer but the returned
**		bytes are stored. The given pad byte is sent to the slave
**		to cause the returned bytes to be sent by the slave.
*/
:intTransfer

cbReq           - number of bytes to receive
bPadT           - pad byte to send to the slave device
pbRcv           - pointer to buffer to receive returned bytes

Return Value:
none

Overrun error handled by the interrupt service routine

This function will set up and begin an interrupt driven
transfer where there is no transmit buffer but the returned
bytes are stored. The given pad byte is sent to the slave
to cause the returned bytes to be sent by the slave.
: intTransfer cbReq - number of bytes to receive bPadT - pad byte to send to the slave device pbRcv - pointer to buffer to receive returned bytes Return Value : none Overrun error handled by the interrupt service routine This function will set up and begin an interrupt driven transfer where there is no transmit buffer but the returned bytes are stored . The given pad byte is sent to the slave to cause the returned bytes to be sent by the slave .
void
DSPI::intTransfer(uint16_t cbReq, uint8_t bPadT, uint8_t * pbRcv) {
	cbCur = cbReq;
	pbSndCur = 0;
	pbRcvCur = pbRcv;
	bPad = bPadT;
	while ((pspi->sxStat.reg & (1 << _SPISTAT_SPITBE)) == 0) {
	}
	pspi->sxBuf.reg = bPad;
}
void DSPI :: intTransfer ( uint16_t cbReq , uint8_t bPadT , uint8_t * pbRcv ) { cbCur = cbReq ; pbSndCur = 0 ; pbRcvCur = pbRcv ; bPad = bPadT ; while ( ( pspi -> sxStat . reg & ( 1 << _SPISTAT_SPITBE ) ) == 0 ) { } pspi -> sxBuf . reg = bPad ; }
DSPI::intTransfer
DSPI :: intTransfer
/* Set up the control variables for the transfer.
	*/ /* Wait for the transmitter to be ready
	*/ /* Send the first byte.
	*/