Renesas M16C/62P Group Computer Hardware User Manual


 
Rev.1.00 2007.11.1
REC10B0002-0100
39
__PollingSerialSending
Synopsis
<Polling transmission>
Boolean __PollingSerialSending(unsigned long data)
data Setup data
Description
Performs transmission of serial communication by polling. This API sends transmit data
by an amount specified by __StartSerialSending from the transmit data buffer specified
by __StartSerialSending. When transmission of all transmit data is complete, it calls a
notification function (if a notification function is registered).
[data]
For data, the following values can be set.
RAPI_COM1 UART0 RAPI_COM2 UART1
RAPI_COM3 UART2 RAPI_COM4 SI/O3
RAPI_COM5 SI/O4
Return value
If the serial port specification is incorrect, RAPI_FALSE is returned; otherwise,
RAPI_TRUE is returned.
Functionality
Serial I/O
Reference
Remark
If an undefined value is specified in the argument, operation of the API cannot be
guaranteed.
Program example
#include ”rapi_sif_m16c_62p”
unsigned int buffer[10];
void func( void )
{
/* Transmission interrupt disable */
__SetSerialInterrupt( RAPI_COM1 | RAPI_INT_TX_DIS | RAPI_INT_RX_DIS );
/* Start transmission */
__StartSerialSending( RAPI_COM1, 5, buffer );
while(1){
__PollingSerialSending( RAPI_COM1 );
}
}