
4BUsage Examples
5.7 Serial Communication Interface
Rev.1.00 May 22 2012
REJ09B0566
RecieveEnd, RecieveError, RecieveBreak);
}
/******************************************************************************
End of function sio0_init
******************************************************************************/
/*""FUNC COMMENT""**************************************************************
* Outline : RecieveEnd
* Description : Display receive message after end of reception
* Argument : none
* Return value : none
*""FUNC COMMENT END""**********************************************************/
void RecieveEnd(void)
{
/* Since PJ6 is shared between SCIF_3 SCK3 and LCD, it needs reconfiguration here.
It is configured here as general purpose output */
R_PFC_Modify(PDL_PJCR1, PDL_PFC_AND, 0xF0FF);
R_IO_PORT_Set(PDL_IO_PORT_J_6, PDL_IO_PORT_OUTPUT, 0);
/* Display the received string on the debug LCD */
DisplayString(LCD_LINE2,c_RecBuff);
}
/**********************************************************************************
End of RecieveEnd
***********************************************************************************/
/*""FUNC COMMENT""**************************************************************
* Outline : RecieveError
* Description : Display receive Error message if Error occurs
* Argument : none
* Return value : none
*""FUNC COMMENT END""**********************************************************/
void RecieveError(uint8_t error)
{
/* Since PJ6 is shared between SCIF_3 SCK3 and LCD, it needs reconfiguration here.
It is configured here as general purpose output */
R_PFC_Modify(PDL_PJCR1, PDL_PFC_AND, 0xF0FF);
R_IO_PORT_Set(PDL_IO_PORT_J_6, PDL_IO_PORT_OUTPUT, 0);
/* Display the received string on the debug LCD */
DisplayString(LCD_LINE2,"RxErr..");
}
/**********************************************************************************
End of RecieveError
***********************************************************************************/
/*""FUNC COMMENT""**************************************************************
* Outline : RecieveBreak
* Description : Display Break message
* Argument : none
* Return value : none
*""FUNC COMMENT END""**********************************************************/
void RecieveBreak(void)
{
/* Since PJ6 is shared between SCIF_3 SCK3 and LCD, it needs reconfiguration here.
It is configured here as general purpose output */
R_PFC_Modify(PDL_PJCR1, PDL_PFC_AND, 0xF0FF);
R_IO_PORT_Set(PDL_IO_PORT_J_6, PDL_IO_PORT_OUTPUT, 0);
/* Display the received string on the debug LCD */
DisplayString(LCD_LINE2,"RX BRK..");
}
Figure 5-8 Example of SCI Reception code
Komentarze do niniejszej Instrukcji