Renesas Single-Chip Microcomputer M38C89T-ADF Instrukcja Użytkownika Strona 107

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 138
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 106
Rev.1.00 May 22 2012
REJ09B0566
4-87
Library Reference
4
4.2.9 40BSerial Communication Interface
R_SCI_Receive
Remarks (2/2) If callback function func1 is specified, callback functions are executed by the interrupt processing
function. This means that no other interrupt can be processed until a callback function has completed.
Program example
/* PDL functions */
#include r_pdl_sci.h
/* PDL device-specific definitions */
#include r_pdl_definitions.h
volatile uint8_t gSCI1ReceiveBuffer[10];
/* SCI channel 1 receive data handler */
void SCI1RxFunc(void){}
/* SCI channel 1 error handler */
void SCI1ErrFunc(uint8_t error_flags){}
/* SCI channel 1 break signal handler */
void SCI1BreakFunc(void){}
void func( void )
{
uint8_t temp;
/* Put a Null character at the end of the string */
gSCI1ReceiveBuffer[10] = NULL;
R_SCI_Receive(
0,
0,
&c_ gSCI1ReceiveBuffer,
8,
SCI1RxFunc,
SCI1ErrFunc,
SCI1BreakFunc
);
}
Przeglądanie stron 106
1 2 ... 102 103 104 105 106 107 108 109 110 111 112 ... 137 138

Komentarze do niniejszej Instrukcji

Brak uwag