Renesas Single-Chip Microcomputer M38C89T-ADF Manuel d'utilisateur Page 106

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 138
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 105
Rev.1.00 May 22 2012
REJ09B0566
4-86
Library Reference
4
4.2.9 40BSerial Communication Interface
R_SCI_Receive
4) R_SCI_Receive
Synopsis
Receive a string of characters.
Prototype bool R_SCI_Receive(
uint8_t data1, // Channel selection
uint8_t data1, // DMA Channel selection
uint8_t * data2, // Receive buffer pointer
uint8_t data3, // Receive threshold
void * func1, // Callback function
void * func2( uint8_t ), // Callback function
void * func3 // Callback function
);
Description
Enable SCI reception and acquire any incoming data.
[data1]
Select channel SCIFn (where n = 0 to 7).
[data2]
The storage area for the expected data.
A null character shall be appended to the received data if more than one character is expected.
[data3]
The number of characters that must be received before the function completes or the callback function is
called.
[func1]
The function to be called when the number of received characters reaches the threshold number.
While the receive operation is in progress:
R_SCI_GetStatus can be used to find out how many characters have been received so far.
R_SCI_Stop can be used to terminate this operation early.
Specify PDL_NO_FUNC for this function to continue until the required number of characters has been
received.
[func2]
The function to be called if a receive error occurs. The error flags shall be supplied to the function in the
format of the Serial Status Register:
b7 b6 b5 b4 b3 b2 b1 b0
0 0 ORER FRE PER 0 0 0
ORER: Overrun error
FRE: Framing error
PER: Parity error
Specify PDL_NO_FUNC to ignore errors.
[func3]
The function to be called if the Break signal is detected.
Specify PDL_NO_FUNC to ignore Break signals.
Return value True if all parameters are valid and the operation completed;
False if a parameter was out of range or if the channel was already receiving.
Category
SCI
Reference
R_SCI_Create, R_SCI_Stop, R_SCI_GetStatus
Remarks (1/2) The maximum number of characters to be received is 255.
This function will wait until a transmission is complete before enabling the reception.
If callback function func1 is specified, reception interrupts are used.
Please see the notes on callback function usage
If no callback function func1 is specified, this function will monitor the RXI flag to manage the data
reception. If the SCI channels control registers are directly modified by the user, this function may lock
up.
Error flags are cleared automatically.
Vue de la page 105
1 2 ... 101 102 103 104 105 106 107 108 109 110 111 ... 137 138

Commentaires sur ces manuels

Pas de commentaire