target/linux/at91/image/dfboot/src/include/lib_AT91RM9200.h
//*----------------------------------------------------------------------------
//* \fn    AT91F_PDC_ReceiveFrame
//* \brief Close PDC: disable TX and RX reset transfer descriptors
//*----------------------------------------------------------------------------
\fn    AT91F_PDC_ReceiveFrame
\brief Close PDC: disable TX and RX reset transfer descriptors
\ fn AT91F_PDC_ReceiveFrame \ brief Close PDC : disable TX and RX reset transfer descriptors
static inline unsigned int AT91F_PDC_ReceiveFrame (
	AT91PS_PDC pPDC,
	char *pBuffer,
	unsigned int szBuffer,
	char *pNextBuffer,
	unsigned int szNextBuffer )
{
	if (AT91F_PDC_IsRxEmpty(pPDC)) {
		AT91F_PDC_SetRx(pPDC, pBuffer, szBuffer);
		AT91F_PDC_SetNextRx(pPDC, pNextBuffer, szNextBuffer);
		return 2;
	}
	else if (AT91F_PDC_IsNextRxEmpty(pPDC)) {
		AT91F_PDC_SetNextRx(pPDC, pBuffer, szBuffer);
		return 1;
	}
	else {
		return 0;
	}
}
static inline unsigned int AT91F_PDC_ReceiveFrame ( AT91PS_PDC pPDC , char * pBuffer , unsigned int szBuffer , char * pNextBuffer , unsigned int szNextBuffer ) { if ( AT91F_PDC_IsRxEmpty ( pPDC ) ) { AT91F_PDC_SetRx ( pPDC , pBuffer , szBuffer ) ; AT91F_PDC_SetNextRx ( pPDC , pNextBuffer , szNextBuffer ) ; return 2 ; } else if ( AT91F_PDC_IsNextRxEmpty ( pPDC ) ) { AT91F_PDC_SetNextRx ( pPDC , pBuffer , szBuffer ) ; return 1 ; } else { return 0 ; } }
\fn    AT91F_PDC_ReceiveFrame
\brief Close PDC: disable TX and RX reset transfer descriptors
\ fn AT91F_PDC_ReceiveFrame \ brief Close PDC : disable TX and RX reset transfer descriptors
//* Buffer and next buffer can be initialized //* Only one buffer can be initialized //* All buffer are in use...