Technical information

CSI to SPI Peripheral Communication in V850ES Microcontrollers
**---------------------------------------------------------------------------
--------------------------------
**
** Abstract:
** The Application is responsible for transfer data of CSI00 interface.
**
** Parameters:
** txnum: The number of data to transmit(frame number).
** txbuf: Address of transfer buffer.
**
** Returns:
** MD_ARGERROR: illegal argument
** MD_OK: transfer success
**
**---------------------------------------------------------------------------
--------------------------------
*/
MD_STATUS CSI00_SendData(UCHAR* txbuf, USHORT txnum)
{
/* init CSI00 send parameter */
CSI00_TX_LEN = txnum; /* send data length */
CSI00_TX_CNT = 0; /* send data count */
CSI00_TX_ADDRESS = txbuf; /* send buffer pointer */
SOTB0L = *CSI00_TX_ADDRESS ++ ;
CSI00_TX_CNT ++ ;
return MD_OK;
}
/*
**---------------------------------------------------------------------------
--------------------------------
**
** Abstract:
** This function receivd data to destination for CSI00 interface and a
** call back function is provided to high level user.
**
** Parameters:
** rxbuf: Header point of receive buffer.
** rxnum: The number of data should be received.
**
** Returns:
** MD_ODDBUF: in 16bit transfer mode, the tx buffer should be even number
** MD_OK: transfer success
**
**---------------------------------------------------------------------------
--------------------------------
*/
MD_STATUS CSI00_ReceiveData(UCHAR* rxbuf, USHORT rxnum)
{
/* init CSI00 receive parameter */
CSI00_RX_LEN = rxnum; /* receive data length */
CSI00_RX_CNT = 0; /* receive data count */
CSI00_RX_ADDRESS = rxbuf;
64