mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Corrected the Rx frame length mask when obtaining the length from the rx descriptor.
This commit is contained in:
parent
17617c5451
commit
df9b2abe91
2 changed files with 19 additions and 2 deletions
|
@ -54,6 +54,11 @@ Changes from V4.0.1
|
|||
+ Made the function vClearEMACTxBuffer() more robust by moving the index
|
||||
manipulation into the if() statement. This allows the tx interrupt to
|
||||
execute even when there is no data to handle.
|
||||
|
||||
Changes from V4.0.4
|
||||
|
||||
+ Corrected the Rx frame length mask when obtaining the length from the
|
||||
rx descriptor.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -128,6 +133,9 @@ one not be immediately available when trying to transmit a frame. */
|
|||
#define emacRESET_KEY ( ( unsigned portLONG ) 0xA5000000 )
|
||||
#define emacRESET_LENGTH ( ( unsigned portLONG ) ( 0x01 << 8 ) )
|
||||
|
||||
/* The Atmel header file only defines the TX frame length mask. */
|
||||
#define emacRX_LENGTH_FRAME ( 0xfff )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Buffer written to by the EMAC DMA. Must be aligned as described by the
|
||||
|
@ -323,7 +331,7 @@ register unsigned portLONG ulIndex, ulLength = 0;
|
|||
frame. The last buffer will give us the length of the entire frame. */
|
||||
while( ( xRxDescriptors[ ulIndex ].addr & AT91C_OWNERSHIP_BIT ) && !ulLength )
|
||||
{
|
||||
ulLength = xRxDescriptors[ ulIndex ].U_Status.status & AT91C_LENGTH_FRAME;
|
||||
ulLength = xRxDescriptors[ ulIndex ].U_Status.status & emacRX_LENGTH_FRAME;
|
||||
|
||||
/* Increment to the next buffer, wrapping if necessary. */
|
||||
ulIndex++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue