Renesas M16C/62P Group Manuel d'utilisateur Page 30

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 98
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 29
Rev.1.00 2007.11.1
REC10B0002-0100
30
Return value
If the serial port specification is incorrect, RAPI_FALSE is returned; otherwise,
RAPI_TRUE is returned.
Functionality
Serial I/O
Reference
__StartSerialReceiving, __StartSerialSending
Remark
If an undefined value is specified in the first argument, operation of the API cannot
be guaranteed.
Program example
#include ”rapi_sif_m16c_62p”
void Notify(unsigned char result) {
if ((result&RAPI_OVER_ERR) == RAPI_OVER_ERR) {
/* Overrun error */
}
if ((result&RAPI_FRAMING_ERR) == RAPI_FRAMING_ERR) {
/* Framing error */
}
if ((result&RAPI_PARITY_ERR) == RAPI_PARITY_ERR) {
/* Parity error */
}
if ((result&RAPI_TX_END) == RAPI_TX_END) {
/* Transmission completion */
}
if ((result&RAPI_RX_END) == RAPI_RX_END) {
/* Reception completion */
}
}
Boolean func( void )
{
/* Set callback functions of RAPI_COM1 to serial driver */
return __ConfigSerialDriverNotify( RAPI_COM1, Notify );
}
Vue de la page 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 97 98

Commentaires sur ces manuels

Pas de commentaire