Technical information

SCI to SPI Peripheral Communication in V850ES Microcontrollers
return MD_OK;
}
/*
**---------------------------------------------------------------------------
--------------------------------
**
** Abstract:
** This function is the high level language interrupt handler
** for the CSI00 transmission completion interrupt (INTCSI00).
**
** Parameters:
** None
**
** Returns:
** None
**
**---------------------------------------------------------------------------
-----------------------------------
*/
__interrupt void MD_INTCSI00( void )
{
/* Send procedure */
if( CSI00_TX_LEN == 1 || (CSI00_TX_CNT == CSI00_TX_LEN)){
/* transmission complete, add user own coding */
CALL_CSI00_Send();
#if (FIX_APPLILET_CSI00_ISR == 1)
/* do not return, continue to check receive */
#else
/* original code returned, which will not receive the last byte
*/
return;
#endif
}
if(CSI00_TX_CNT < CSI00_TX_LEN){
SOTB0L = *CSI00_TX_ADDRESS ++ ;
CSI00_TX_CNT ++ ;
}
/* Receive procedure */
if(CSI00_RX_LEN != 0){
if(CSI00_RX_CNT + 1 < CSI00_RX_LEN){
*CSI00_RX_ADDRESS ++ = SIRB0L;
CSI00_RX_CNT ++ ;
}
else{ /* last data */
*CSI00_RX_ADDRESS = SIO00;
CSI00_RX_CNT ++ ;
CALL_CSI00_Receive();
}
}
}
65