Specifications
RX62N Group Ethernet Transmit and Receive Settings
R01AN0629EJ0101 Rev.1.01 Page 35 of 52
Mar 31, 2011
4.4.2 48BR_Ether_Close
The R_Ether_Close function disables the transmit and receive functions of the ETHERC. This function does not
power-down the ETHERC and EDMAC.
• Prototype
int32_t R_Ether_Close(uint32_t ch);
• Arguments
⎯ ch
ETHERC channel number specification
• Return values
R_ETHER_OK(0): Normal completion
R_ETHER_ERROR(-1): Error
• Properties
Declared in r_ether.h file
Defined in r_ether.c file
• Description
The R_Ether_Close function disables the transmit and receive functions of the ETHERC.
The RX62N has only one Ethernet channel, so Ethernet driver processing does not branch according to the channel
number. The function will operate normally regardless of the channel number value, but setting the channel number
to 0 is recommended.
4.4.3 49BR_Ether_Read
The R_Ether_Read function receives data to the application’s receive buffer.
• Prototype
int32_t R_Ether_Read(uint32_t ch, void *buf);
• Arguments
⎯ ch
ETHERC channel number specification
⎯ *buf
Receive data buffer pointer
• Return values
Value of 0 or greater: Number of bytes received. 0 indicates no receive data.
R_ETHER_ERROR(-1): Error (Covers both hardware and software errors.)
R_ETHER_HARD_ERROR(-3): Hardware error (Software reset required to recover.)
R_ETHER_RECOVERABLE(-4): Recoverable error (Software reset not required to recover.)
R_ETHER_NODATA(-5): No receive data
Note: The sample program does not use the R_ETHER_HARD_ERROR(-3), R_ETHER_RECOVERABLE(-
4), and R_ETHER_NODATA(-5) return values.
• Properties
Declared in r_ether.h file
Defined in r_ether.c file
• Description
The R_Ether_Read function reads data from the buffer designated by the receive descriptor. The receive descriptor
status is updated each time new data is processed. After reading the data, the function copies it to the receive data
buffer.
The RX62N has only one Ethernet channel, so Ethernet driver processing does not branch according to the channel
number. The function will operate normally regardless of the channel number value, but setting the channel number
to 0 is recommended.
The data associated with a descriptor that generates a receive frame error is discarded, the status is cleared, and read
operation continues.