User`s manual
RX62N Group, RX621 Group 4. Library Reference
4) R_SCI_Send
Synopsis
Transmit data on a SCI channel.
Prototype
bool R_SCI_Send(
uint8_t data1,
// Channel selection
uint16_t data2,
// Channel configuration (and Target Station ID)
uint8_t * data3,
// Data start address
uint16_t data4,
// Data count
void * func
// Callback function
);
Description
Transmit data on the specified serial channel.
[data1]
Select channel SCIn (where n = 0 to 6, but not 4).
[data2]
Control options.
The default options are shown in bold. Specify PDL_NO_DATA to use the defaults.
•
DMAC / DTC trigger control.
PDL_SCI_DMAC_DTC_TRIGGER_DISABLE or
PDL_SCI_DMAC_TRIGGER_ENABLE or
PDL_SCI_DTC_TRIGGER_ENABLE
Disable or enable activation of the DMAC
or DTC when a data byte is transmitted.
•
ID transmission control (valid only in Multi-processor mode).
PDL_SCI_MP_ID_CYCLE
Transmit the upper byte as the ID byte.
The valid ID range is 0 to 255.
[data3]
The start address of the data to be sent.
Specify PDL_NO_PTR for the ID cycle in Multi-processor mode.
If the DMAC or DTC shall be used to transfer the data, specify PDL_NO_PTR.
[data4]
For sending binary data, set this to the number of bytes to be sent. The valid range is 1 to 65535.
Set this to 0 for transmission of a null-terminated character string.
For the ID cycle in Multi-processor mode, specify 0.
If the DMAC or DTC shall be used to transfer the data, specify PDL_NO_DATA.
[func]
Specify PDL_NO_FUNC or a callback function name, depending on the required transfer method.
Use R_SCI_Control to terminate this operation early.
R_SCI_GetStatus can be used to find out how many characters have been transmitted.
Transfer method
Parameter
Polling
PDL_NO_FUNC. This function will continue until the required number of
bytes has been sent.
Interrupts
The function to be called when the last byte has been sent.
DMAC
Either the function to be called when each byte is sent, or PDL_NO_FUNC if
the callback function specified in R_DMAC_Create will be used.
DTC
The function to be called at the interval specified in R_DTC_Create.
Return value
True if all parameters are valid and the operation completed without errors;
False if a parameter was out of range or if the channel was already transmitting or if an error
occurred during transmission.
Category
SCI
Reference
R_SCI_Create, R_SCI_Control, R_SCI_GetStatus
R20UT0084EE0112 Rev.1.12 Page 4-175
July. 16, 2014