mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-24 01:52:08 +08:00
+TCP: Fix spellings (#302)
* MISRA v5 * Add spelling corrections * Update after Shubham's comments * Actually fix the spelling
This commit is contained in:

committed by
GitHub

parent
ab70c1ce33
commit
6fb8b1fc33
@ -76,10 +76,10 @@ static TickType_t xLastGratuitousARPTime = ( TickType_t ) 0;
|
||||
/*
|
||||
* IP-clash detection is currently only used internally. When DHCP doesn't respond, the
|
||||
* driver can try out a random LinkLayer IP address (169.254.x.x). It will send out a
|
||||
* gratuitos ARP message and, after a period of time, check the variables here below:
|
||||
* gratuitous ARP message and, after a period of time, check the variables here below:
|
||||
*/
|
||||
#if( ipconfigARP_USE_CLASH_DETECTION != 0 )
|
||||
/* Becomes non-zero if another device responded to a gratuitos ARP message. */
|
||||
/* Becomes non-zero if another device responded to a gratuitous ARP message. */
|
||||
BaseType_t xARPHadIPClash;
|
||||
/* MAC-address of the other device containing the same IP-address. */
|
||||
MACAddress_t xARPClashMacAddress;
|
||||
@ -339,7 +339,7 @@ uint8_t ucMinAgeFound = 0U;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Nothing happes to this cache entry for now. */
|
||||
/* Nothing happens to this cache entry for now. */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -627,7 +627,7 @@ static void prvInitialiseDHCP( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
/* There was a problem with the randomiser. */
|
||||
/* There was a problem with the randomizer. */
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@ -906,7 +906,7 @@ void *pvCopyDest;
|
||||
pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( sizeof( UDPPacket_t ) + uxRequiredBufferSize, portMAX_DELAY );
|
||||
} while( pxNetworkBuffer == NULL );
|
||||
|
||||
/* Leave space for the UPD header. */
|
||||
/* Leave space for the UDP header. */
|
||||
pucUDPPayloadBuffer = &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] );
|
||||
pxDHCPMessage = ipCAST_PTR_TO_TYPE_PTR( DHCPMessage_IPv4_t, pucUDPPayloadBuffer );
|
||||
|
||||
|
@ -376,7 +376,7 @@ static portINLINE ipDECL_CAST_PTR_FUNC_FOR_TYPE( DNSAnswerRecord_t )
|
||||
typedef struct xDNS_Callback
|
||||
{
|
||||
TickType_t uxRemaningTime; /* Timeout in ms */
|
||||
FOnDNSEvent pCallbackFunction; /* Function to be called when the address has been found or when a timeout has beeen reached */
|
||||
FOnDNSEvent pCallbackFunction; /* Function to be called when the address has been found or when a timeout has been reached */
|
||||
TimeOut_t uxTimeoutState;
|
||||
void *pvSearchID;
|
||||
struct xLIST_ITEM xListItem;
|
||||
@ -406,7 +406,7 @@ static portINLINE ipDECL_CAST_PTR_FUNC_FOR_TYPE( DNSAnswerRecord_t )
|
||||
|
||||
/* Iterate through the list of call-back structures and remove
|
||||
old entries which have reached a timeout.
|
||||
As soon as the list hase become empty, the DNS timer will be stopped
|
||||
As soon as the list has become empty, the DNS timer will be stopped
|
||||
In case pvSearchID is supplied, the user wants to cancel a DNS request
|
||||
*/
|
||||
void vDNSCheckCallBack( void *pvSearchID )
|
||||
@ -495,7 +495,7 @@ static portINLINE ipDECL_CAST_PTR_FUNC_FOR_TYPE( DNSAnswerRecord_t )
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* A DNS reply was received, see if there is any matching entry and
|
||||
call the handler. Returns pdTRUE if uxIdentifier was recognised. */
|
||||
call the handler. Returns pdTRUE if uxIdentifier was recognized. */
|
||||
static BaseType_t xDNSDoCallback( TickType_t uxIdentifier,
|
||||
const char *pcName,
|
||||
uint32_t ulIPAddress )
|
||||
@ -782,7 +782,7 @@ TickType_t uxWriteTimeOut_ticks = ipconfigDNS_SEND_BLOCK_TIME_TICKS;
|
||||
|
||||
/* The reply was received. Process it. */
|
||||
#if( ipconfigDNS_USE_CALLBACKS == 0 )
|
||||
/* It is useless to analyse the unexpected reply
|
||||
/* It is useless to analyze the unexpected reply
|
||||
unless asynchronous look-ups are enabled. */
|
||||
if( xExpected != pdFALSE )
|
||||
#endif /* ipconfigDNS_USE_CALLBACKS == 0 */
|
||||
@ -899,7 +899,7 @@ void *pvCopyDest;
|
||||
pucStart = pucByte;
|
||||
} while( *pucByte != ( uint8_t ) 0U );
|
||||
|
||||
/* Finish off the record. Cast the record onto DNSTail_t stucture to easily
|
||||
/* Finish off the record. Cast the record onto DNSTail_t structure to easily
|
||||
* access the fields of the DNS Message. */
|
||||
pxTail = ipCAST_PTR_TO_TYPE_PTR( DNSTail_t, &( pucByte[ 1 ] ) );
|
||||
|
||||
@ -927,7 +927,7 @@ void *pvCopyDest;
|
||||
size_t uxIndex = 0U;
|
||||
size_t uxSourceLen = uxRemainingBytes;
|
||||
|
||||
/* uxCount gets the valus from pucByte and counts down to 0.
|
||||
/* uxCount gets the values from pucByte and counts down to 0.
|
||||
No need to have a different type than that of pucByte */
|
||||
size_t uxCount;
|
||||
|
||||
|
@ -302,7 +302,7 @@ static BaseType_t xNetworkUp = pdFALSE;
|
||||
A timer for each of the following processes, all of which need attention on a
|
||||
regular basis:
|
||||
1. ARP, to check its table entries
|
||||
2. DPHC, to send requests and to renew a reservation
|
||||
2. DHCP, to send requests and to renew a reservation
|
||||
3. TCP, to check for timeouts, resends
|
||||
4. DNS, to check for timeouts when looking-up a domain.
|
||||
*/
|
||||
@ -1599,7 +1599,7 @@ eFrameProcessingResult_t eReturn = eProcessBuffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Packet is not fragemented, destination is this device. */
|
||||
/* Packet is not fragmented, destination is this device. */
|
||||
}
|
||||
}
|
||||
#endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */
|
||||
@ -2392,7 +2392,7 @@ DEBUG_DECLARE_TRACE_VARIABLE( BaseType_t, xLocation, 0 );
|
||||
|
||||
/**
|
||||
* This method generates a checksum for a given IPv4 header, per RFC791 (page 14).
|
||||
* The checksum algorithm is decribed as:
|
||||
* The checksum algorithm is described as:
|
||||
* "[T]he 16 bit one's complement of the one's complement sum of all 16 bit words in the
|
||||
* header. For purposes of computing the checksum, the value of the checksum field is zero."
|
||||
*
|
||||
@ -2829,7 +2829,7 @@ BaseType_t FreeRTOS_IsNetworkUp( void )
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
/* Utility function: Convert error number to a human readable
|
||||
* string. Decalartion in FreeRTOS_errno_TCP.h. */
|
||||
* string. Declaration in FreeRTOS_errno_TCP.h. */
|
||||
const char *FreeRTOS_strerror_r( BaseType_t xErrnum, char *pcBuffer, size_t uxLength )
|
||||
{
|
||||
const char *pcName;
|
||||
|
@ -292,7 +292,7 @@ FreeRTOS_Socket_t const *pxSocket = NULL;
|
||||
}
|
||||
/* In case configASSERT() is not used */
|
||||
( void )xDomain;
|
||||
( void )pxSocket; /* Was only use fot sizeof. */
|
||||
( void )pxSocket; /* Was only used for sizeof. */
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@ -655,7 +655,7 @@ Socket_t xReturn;
|
||||
|
||||
/*
|
||||
* FreeRTOS_recvfrom: receive data from a bound socket
|
||||
* In this library, the function can only be used with connectionsless sockets
|
||||
* In this library, the function can only be used with connection-less sockets
|
||||
* (UDP)
|
||||
*/
|
||||
int32_t FreeRTOS_recvfrom( Socket_t xSocket, void *pvBuffer, size_t uxBufferLength, BaseType_t xFlags, struct freertos_sockaddr *pxSourceAddress, socklen_t *pxSourceAddressLength )
|
||||
@ -1211,7 +1211,7 @@ xCloseEvent.pvData = xSocket;
|
||||
}
|
||||
#endif /* ( ( ipconfigUSE_TCP == 1 ) && ( ipconfigUSE_CALLBACKS == 1 ) ) */
|
||||
|
||||
/* Let the IP task close the socket to keep it synchronised with the
|
||||
/* Let the IP task close the socket to keep it synchronized with the
|
||||
packet handling. */
|
||||
|
||||
/* Note when changing the time-out value below, it must be checked who is calling
|
||||
@ -1327,7 +1327,7 @@ NetworkBufferDescriptor_t *pxNetworkBuffer;
|
||||
}
|
||||
#endif /* ( ipconfigUSE_TCP == 1 ) && ( ipconfigHAS_DEBUG_PRINTF != 0 ) */
|
||||
|
||||
/* Anf finally, after all resources have been freed, free the socket space */
|
||||
/* And finally, after all resources have been freed, free the socket space */
|
||||
iptraceMEM_STATS_DELETE( pxSocket );
|
||||
vPortFreeSocket( pxSocket );
|
||||
|
||||
@ -1681,7 +1681,7 @@ FreeRTOS_Socket_t *pxSocket;
|
||||
xReturn = 0;
|
||||
break;
|
||||
|
||||
case FREERTOS_SO_CLOSE_AFTER_SEND: /* As soon as the last byte has been transmitted, finalise the connection */
|
||||
case FREERTOS_SO_CLOSE_AFTER_SEND: /* As soon as the last byte has been transmitted, finalize the connection */
|
||||
{
|
||||
if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP )
|
||||
{
|
||||
@ -2555,7 +2555,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t *pxSocket )
|
||||
if( pxSocket->u.xTCP.bits.bMallocError != pdFALSE_UNSIGNED )
|
||||
{
|
||||
/* The no-memory error has priority above the non-connected error.
|
||||
Both are fatal and will elad to closing the socket. */
|
||||
Both are fatal and will lead to closing the socket. */
|
||||
xByteCount = -pdFREERTOS_ERRNO_ENOMEM;
|
||||
}
|
||||
else
|
||||
@ -3106,7 +3106,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t *pxSocket )
|
||||
pxSocket = ipCAST_PTR_TO_TYPE_PTR( FreeRTOS_Socket_t, listGET_LIST_ITEM_OWNER( pxIterator ) );
|
||||
pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator );
|
||||
|
||||
/* Sockets with 'tmout == 0' do not need any regular attention. */
|
||||
/* Sockets with 'timeout == 0' do not need any regular attention. */
|
||||
if( pxSocket->u.xTCP.usTimeout == 0U )
|
||||
{
|
||||
continue;
|
||||
|
@ -182,7 +182,7 @@ size_t uxSize, uxCount, uxFirst, uxNextTail;
|
||||
|
||||
if( ( xPeek == pdFALSE ) && ( uxOffset == 0UL ) )
|
||||
{
|
||||
/* Move the tail pointer to effecively remove the data read from
|
||||
/* Move the tail pointer to effectively remove the data read from
|
||||
the buffer. */
|
||||
uxNextTail += uxCount;
|
||||
|
||||
|
@ -132,7 +132,7 @@
|
||||
|
||||
/*
|
||||
* When there are no TCP options, the TCP offset equals 20 bytes, which is stored as
|
||||
* the number 5 (words) in the higher niblle of the TCP-offset byte.
|
||||
* the number 5 (words) in the higher nibble of the TCP-offset byte.
|
||||
*/
|
||||
#define tcpTCP_OFFSET_LENGTH_BITS ( 0xf0U )
|
||||
#define tcpTCP_OFFSET_STANDARD_LENGTH ( 0x50U )
|
||||
@ -820,7 +820,7 @@ void *pvCopyDest;
|
||||
if( pxSocket->u.xTCP.bits.bSendKeepAlive != pdFALSE_UNSIGNED )
|
||||
{
|
||||
/* Sending a keep-alive packet, send the current sequence number
|
||||
minus 1, which will be recognised as a keep-alive packet an
|
||||
minus 1, which will be recognized as a keep-alive packet an
|
||||
responded to by acknowledging the last byte. */
|
||||
pxSocket->u.xTCP.bits.bSendKeepAlive = pdFALSE_UNSIGNED;
|
||||
pxSocket->u.xTCP.bits.bWaitKeepAlive = pdTRUE_UNSIGNED;
|
||||
@ -961,7 +961,7 @@ void *pvCopyDest;
|
||||
|
||||
/*
|
||||
* The SYN event is very important: the sequence numbers, which have a kind of
|
||||
* random starting value, are being synchronised. The sliding window manager
|
||||
* random starting value, are being synchronized. The sliding window manager
|
||||
* (in FreeRTOS_TCP_WIN.c) needs to know them, along with the Maximum Segment
|
||||
* Size (MSS) in use.
|
||||
*/
|
||||
@ -1020,7 +1020,7 @@ uint32_t ulInitialSequenceNumber = 0;
|
||||
case eARPCacheMiss: /* An ARP table lookup did not find a valid entry. */
|
||||
case eCantSendPacket: /* There is no IP address, or an ARP is still in progress. */
|
||||
default:
|
||||
/* Count the number of times it couldn't find the ARP address. */
|
||||
/* Count the number of times it could not find the ARP address. */
|
||||
pxSocket->u.xTCP.ucRepCount++;
|
||||
|
||||
FreeRTOS_debug_printf( ( "ARP for %lxip (using %lxip): rc=%d %02X:%02X:%02X %02X:%02X:%02X\n",
|
||||
@ -1445,7 +1445,7 @@ BaseType_t xReturn = pdFALSE;
|
||||
/*
|
||||
* When opening a TCP connection, while SYN's are being sent, the parties may
|
||||
* communicate what MSS (Maximum Segment Size) they intend to use. MSS is the
|
||||
* nett size of the payload, always smaller than MTU.
|
||||
* net size of the payload, always smaller than MTU.
|
||||
*/
|
||||
static UBaseType_t prvSetSynAckOptions( FreeRTOS_Socket_t *pxSocket, TCPHeader_t * pxTCPHeader )
|
||||
{
|
||||
@ -1515,7 +1515,7 @@ static void prvTCPTouchSocket( FreeRTOS_Socket_t *pxSocket )
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Changing to a new state. Centralised here to do specific actions such as
|
||||
* Changing to a new state. Centralized here to do specific actions such as
|
||||
* resetting the alive timer, calling the user's OnConnect handler to notify
|
||||
* that a socket has got (dis)connected, and setting bit to unblock a call to
|
||||
* FreeRTOS_select()
|
||||
@ -1774,8 +1774,6 @@ BaseType_t xResize;
|
||||
configASSERT( pxNetworkBuffer != NULL ); /* to tell lint: when xResize is false, pxNetworkBuffer is not NULL. */
|
||||
pxReturn = pxNetworkBuffer;
|
||||
|
||||
/* Thanks to Andrey Ivanov from swissEmbedded for reporting that the
|
||||
xDataLength member must get the correct length too! */
|
||||
pxNetworkBuffer->xDataLength = ( size_t ) ( ipSIZE_OF_ETH_HEADER + uxIPHeaderSizeSocket( pxSocket ) + ipSIZE_OF_TCP_HEADER + uxOptionsLength ) + ( size_t ) lDataLen;
|
||||
}
|
||||
|
||||
@ -2467,7 +2465,7 @@ UBaseType_t uxIntermediateResult = 0;
|
||||
pxProtocolHeaders->xTCPHeader.ucTCPFlags = tcpTCP_FLAG_ACK;
|
||||
|
||||
/* This socket was the one connecting actively so now perform the
|
||||
synchronisation. */
|
||||
synchronization. */
|
||||
vTCPWindowInit( &pxSocket->u.xTCP.xTCPWindow,
|
||||
ulSequenceNumber, pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber, ( uint32_t ) pxSocket->u.xTCP.usCurMSS );
|
||||
pxTCPWindow->rx.ulHighestSequenceNumber = ulSequenceNumber + 1U;
|
||||
@ -2622,7 +2620,7 @@ UBaseType_t uxIntermediateResult = 0;
|
||||
|
||||
if( ( bRxComplete == 0 ) || ( bTxDone == 0 ) )
|
||||
{
|
||||
/* Refusing FIN: Rx incomp 1 optlen 4 tx done 1. */
|
||||
/* Refusing FIN: Rx incomplete 1 optlen 4 tx done 1. */
|
||||
FreeRTOS_debug_printf( ( "Refusing FIN[%u,%u]: RxCompl %lu tx done %ld\n",
|
||||
pxSocket->usLocalPort,
|
||||
pxSocket->u.xTCP.usRemotePort,
|
||||
@ -2667,7 +2665,7 @@ UBaseType_t uxIntermediateResult = 0;
|
||||
{
|
||||
uxIntermediateResult = uxIPHeaderSizeSocket( pxSocket ) + ipSIZE_OF_TCP_HEADER + uxOptionsLength;
|
||||
xSendLength = ( BaseType_t ) uxIntermediateResult;
|
||||
/* TCP-offsett equals '( ( length / 4 ) << 4 )', resulting in a shift-left 2 */
|
||||
/* TCP-offset equals '( ( length / 4 ) << 4 )', resulting in a shift-left 2 */
|
||||
pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 );
|
||||
|
||||
if( pxSocket->u.xTCP.bits.bFinSent != pdFALSE_UNSIGNED )
|
||||
|
@ -129,7 +129,7 @@ from the FreeRTOSIPConfig.h configuration header file. */
|
||||
#endif
|
||||
|
||||
#ifdef ipconfigDHCP_USES_USER_HOOK
|
||||
#error ipconfigDHCP_USES_USER_HOOK and its associated callback have been superceeded - see http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html#ipconfigUSE_DHCP_HOOK
|
||||
#error ipconfigDHCP_USES_USER_HOOK and its associated callback have been superceded - see http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html#ipconfigUSE_DHCP_HOOK
|
||||
#endif
|
||||
|
||||
#ifndef ipconfigUSE_TCP
|
||||
@ -155,7 +155,7 @@ from the FreeRTOSIPConfig.h configuration header file. */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For debuging/logging: check if the port number is used for telnet
|
||||
* For debugging/logging: check if the port number is used for telnet
|
||||
* Some events will not be logged for telnet connections
|
||||
* because it would produce logging about the transmission of the logging...
|
||||
* This macro will only be used if FreeRTOS_debug_printf() is defined for logging
|
||||
@ -262,7 +262,7 @@ from the FreeRTOSIPConfig.h configuration header file. */
|
||||
* - DHCP: For creating a DHCP transaction number
|
||||
* - TCP: Set the Initial Sequence Number: this is the value of the first outgoing
|
||||
* sequence number being used when connecting to a peer.
|
||||
* Having a well randomised ISN is important to avoid spoofing
|
||||
* Having a well randomized ISN is important to avoid spoofing
|
||||
* - UDP/TCP: for setting the first port number to be used, in case a socket
|
||||
* uses a 'random' or anonymous port number
|
||||
*/
|
||||
@ -353,7 +353,7 @@ from the FreeRTOSIPConfig.h configuration header file. */
|
||||
#endif
|
||||
|
||||
#ifndef ipconfigUDP_MAX_RX_PACKETS
|
||||
/* Make postive to define the maximum number of packets which will be buffered
|
||||
/* Make positive to define the maximum number of packets which will be buffered
|
||||
* for each UDP socket.
|
||||
* Can be overridden with the socket option FREERTOS_SO_UDP_MAX_RX_PACKETS
|
||||
*/
|
||||
|
@ -63,7 +63,7 @@ typedef enum
|
||||
void vARPRefreshCacheEntry( const MACAddress_t * pxMACAddress, const uint32_t ulIPAddress );
|
||||
|
||||
#if( ipconfigARP_USE_CLASH_DETECTION != 0 )
|
||||
/* Becomes non-zero if another device responded to a gratuitos ARP message. */
|
||||
/* Becomes non-zero if another device responded to a gratuitous ARP message. */
|
||||
extern BaseType_t xARPHadIPClash;
|
||||
/* MAC-address of the other device containing the same IP-address. */
|
||||
extern MACAddress_t xARPClashMacAddress;
|
||||
|
@ -39,7 +39,7 @@ extern "C" {
|
||||
#include "IPTraceMacroDefaults.h"
|
||||
|
||||
/* Some constants defining the sizes of several parts of a packet.
|
||||
These defines come before inlucding the configuration header files. */
|
||||
These defines come before including the configuration header files. */
|
||||
/* The size of the Ethernet header is 14, meaning that 802.1Q VLAN tags
|
||||
are not ( yet ) supported. */
|
||||
#define ipSIZE_OF_ETH_HEADER 14U
|
||||
|
@ -524,7 +524,7 @@ socket events. */
|
||||
*
|
||||
* Only use the FreeRTOS_NetworkDownFromISR() version if the function is to be
|
||||
* called from an interrupt service routine. If FreeRTOS_NetworkDownFromISR()
|
||||
* returns a non-zero value then a context switch should be performed ebfore
|
||||
* returns a non-zero value then a context switch should be performed before
|
||||
* the interrupt is exited.
|
||||
*/
|
||||
void FreeRTOS_NetworkDown( void );
|
||||
@ -837,7 +837,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t *pxSocket );
|
||||
/*
|
||||
* Some helping function, their meaning should be clear.
|
||||
* Going by MISRA rules, these utility functions should not be defined
|
||||
* if they are not being used anywhwere. But their use depends on the
|
||||
* if they are not being used anywhere. But their use depends on the
|
||||
* application and hence these functions are defined unconditionally.
|
||||
*/
|
||||
static portINLINE uint32_t ulChar2u32 (const uint8_t *apChr);
|
||||
|
@ -116,7 +116,7 @@ FreeRTOS_setsockopt(). */
|
||||
#endif /* ipconfigUSE_CALLBACKS */
|
||||
|
||||
#define FREERTOS_SO_REUSE_LISTEN_SOCKET ( 11 ) /* When a listening socket gets connected, do not create a new one but re-use it */
|
||||
#define FREERTOS_SO_CLOSE_AFTER_SEND ( 12 ) /* As soon as the last byte has been transmitted, finalise the connection */
|
||||
#define FREERTOS_SO_CLOSE_AFTER_SEND ( 12 ) /* As soon as the last byte has been transmitted, finalize the connection */
|
||||
#define FREERTOS_SO_WIN_PROPERTIES ( 13 ) /* Set all buffer and window properties in one call, parameter is pointer to WinProperties_t */
|
||||
#define FREERTOS_SO_SET_FULL_SIZE ( 14 ) /* Refuse to send packets smaller than MSS */
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
||||
/*
|
||||
* FreeRTOS_Stream_Buffer.h
|
||||
*
|
||||
* A cicular character buffer
|
||||
* A circular character buffer
|
||||
* An implementation of a circular buffer without a length field
|
||||
* If LENGTH defines the size of the buffer, a maximum of (LENGT-1) bytes can be stored
|
||||
* If LENGTH defines the size of the buffer, a maximum of (LENGTH-1) bytes can be stored
|
||||
* In order to add or read data from the buffer, memcpy() will be called at most 2 times
|
||||
*/
|
||||
|
||||
|
@ -188,7 +188,7 @@ BaseType_t xTCPWindowTxHasData( TCPWindow_t const * pxWindow, uint32_t ulWindowS
|
||||
BaseType_t xTCPWindowTxDone( const TCPWindow_t *pxWindow );
|
||||
|
||||
/* Fetches data to be sent.
|
||||
* apPos will point to a location with the circular data buffer: txStream */
|
||||
* plPosition will point to a location with the circular data buffer: txStream */
|
||||
uint32_t ulTCPWindowTxGet( TCPWindow_t *pxWindow, uint32_t ulWindowSize, int32_t *plPosition );
|
||||
|
||||
/* Receive a normal ACK */
|
||||
|
@ -29,4 +29,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
; /* FIX ME. Update for the compiler specifier needed at end of a struct declartion to pack the struct. */
|
||||
; /* FIX ME. Update for the compiler specifier needed at end of a struct declaration to pack the struct. */
|
@ -29,4 +29,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
/* FIX ME. Update for the compiler specifier needed at the start of a struct declartion to pack the struct. */
|
||||
/* FIX ME. Update for the compiler specifier needed at the start of a struct declaration to pack the struct. */
|
@ -376,7 +376,7 @@ const TickType_t xShortTime = pdMS_TO_TICKS( 100UL );
|
||||
|
||||
if( ( xEndTime - xStartTime ) > xMaxTime )
|
||||
{
|
||||
/* Wated more than xMaxTime, return. */
|
||||
/* Waited more than xMaxTime, return. */
|
||||
xReturn = pdFALSE;
|
||||
break;
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ extern "C" {
|
||||
// IEEE defined Registers
|
||||
#define GMII_BMCR 0x00 // Basic Control
|
||||
#define GMII_BMSR 0x01 // Basic Status
|
||||
#define GMII_PHYID1 0x02 // PHY Idendifier 1
|
||||
#define GMII_PHYID2 0x03 // PHY Idendifier 2
|
||||
#define GMII_PHYID1 0x02 // PHY Identifier 1
|
||||
#define GMII_PHYID2 0x03 // PHY Identifier 2
|
||||
#define GMII_ANAR 0x04 // Auto_Negotiation Advertisement
|
||||
#define GMII_ANLPAR 0x05 // Auto_negotiation Link Partner Ability
|
||||
#define GMII_ANER 0x06 // Auto-negotiation Expansion
|
||||
@ -179,8 +179,8 @@ extern "C" {
|
||||
#define GMII_EXTEND_CAPAB (1 << 0) // Extended Capability
|
||||
|
||||
|
||||
// Bit definitions: GMII_PHYID1 0x02 PHY Idendifier 1
|
||||
// Bit definitions: GMII_PHYID2 0x03 PHY Idendifier 2
|
||||
// Bit definitions: GMII_PHYID1 0x02 PHY Identifier 1
|
||||
// Bit definitions: GMII_PHYID2 0x03 PHY Identifier 2
|
||||
#define GMII_LSB_MASK 0x3F
|
||||
#define GMII_OUI_MSB 0x0022
|
||||
#define GMII_OUI_LSB 0x05
|
||||
|
@ -427,7 +427,7 @@ void gmac_dev_init(Gmac* p_gmac, gmac_device_t* p_gmac_dev,
|
||||
|
||||
/*
|
||||
* GMAC_DCFGR_TXCOEN: (GMAC_DCFGR) Transmitter Checksum Generation Offload Enable.
|
||||
* Note: tha SAM4E does have RX checksum offloading
|
||||
* Note: that SAM4E does have RX checksum offloading
|
||||
* but TX checksum offloading has NOT been implemented.
|
||||
*/
|
||||
|
||||
@ -649,7 +649,7 @@ uint32_t gmac_dev_write(gmac_device_t* p_gmac_dev, void *p_buffer,
|
||||
if (p_buffer && ul_size) {
|
||||
/* Driver manages the ring buffer */
|
||||
/* Calculating the checksum here is faster than calculating it from the GMAC buffer
|
||||
* because withing p_buffer, it is well aligned */
|
||||
* because within p_buffer, it is well aligned */
|
||||
#if( ipconfigZERO_COPY_TX_DRIVER != 0 )
|
||||
{
|
||||
/* Zero-copy... */
|
||||
@ -859,7 +859,7 @@ void gmac_handler(gmac_device_t* p_gmac_dev)
|
||||
|
||||
if (ul_isr & GMAC_ISR_RCOMP)
|
||||
ul_rsr |= GMAC_RSR_REC;
|
||||
/* Invoke callbacks which can be useful to wake op a task */
|
||||
/* Invoke callbacks which can be useful to wake up a task */
|
||||
if (p_gmac_dev->func_rx_cb) {
|
||||
p_gmac_dev->func_rx_cb(ul_rsr);
|
||||
}
|
||||
|
@ -1223,7 +1223,7 @@ void gmac_handler(gmac_device_t* p_gmac_dev);
|
||||
* #define ETHERNET_CONF_ETHADDR4 0xA0
|
||||
* #define ETHERNET_CONF_ETHADDR5 0x02
|
||||
* \endcode
|
||||
* -# Define the IP address configration used in the application. When DHCP
|
||||
* -# Define the IP address configuration used in the application. When DHCP
|
||||
* is enabled, this configuration is not effected.
|
||||
* - \code
|
||||
* #define ETHERNET_CONF_IPADDR0 192
|
||||
|
@ -1242,7 +1242,7 @@ void gmac_handler(gmac_device_t* p_gmac_dev);
|
||||
* #define ETHERNET_CONF_NET_MASK2 255
|
||||
* #define ETHERNET_CONF_NET_MASK3 0
|
||||
* \endcode
|
||||
* -# Configure the PHY maintainance interface.
|
||||
* -# Configure the PHY maintenance interface.
|
||||
* - \code
|
||||
* #define ETH_PHY_MODE GMAC_PHY_MII
|
||||
* \endcode
|
||||
|
@ -622,7 +622,7 @@ uint32_t gmac_dev_read(gmac_device_t* p_gmac_dev, uint8_t* p_frame,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The driver couldn't not allocate a buffer to receive a packet.
|
||||
/* The driver could not allocate a buffer to receive a packet.
|
||||
Leave the current DMA buffer in place. */
|
||||
}
|
||||
}
|
||||
@ -685,7 +685,7 @@ uint32_t gmac_dev_write(gmac_device_t* p_gmac_dev, void *p_buffer,
|
||||
if (p_buffer && ul_size) {
|
||||
/* Driver manages the ring buffer */
|
||||
/* Calculating the checksum here is faster than calculating it from the GMAC buffer
|
||||
* because withing p_buffer, it is well aligned */
|
||||
* because within p_buffer, it is well aligned */
|
||||
#if( ipconfigZERO_COPY_TX_DRIVER != 0 )
|
||||
{
|
||||
/* Zero-copy... */
|
||||
@ -853,7 +853,7 @@ void gmac_handler(gmac_device_t* p_gmac_dev)
|
||||
|
||||
if (ul_isr & GMAC_ISR_RCOMP)
|
||||
ul_rsr |= GMAC_RSR_REC;
|
||||
/* Invoke callbacks which can be useful to wake op a task */
|
||||
/* Invoke callbacks which can be useful to wake up a task */
|
||||
xRxCallback( ul_rsr );
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,7 @@ size_t xExpectedLength;
|
||||
IPPacket_t *pxIPPacket;
|
||||
|
||||
pxIPPacket = ( IPPacket_t * ) pxDescriptor->pucEthernetBuffer;
|
||||
/* Look at the actual length of the packet, translate it to a host-endial notation. */
|
||||
/* Look at the actual length of the packet, translate it to a host-endian notation. */
|
||||
xExpectedLength = sizeof( EthernetHeader_t ) + ( size_t ) FreeRTOS_htons( pxIPPacket->xIPHeader.usLength );
|
||||
|
||||
if( xExpectedLength == ( pxDescriptor->xDataLength + 4 ) )
|
||||
|
@ -133,7 +133,7 @@ BaseType_t xNetworkInterfaceInitialise( void )
|
||||
BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, BaseType_t xReleaseAfterSend )
|
||||
{
|
||||
uint8_t *buffer=NULL;
|
||||
// FreeRTOS_printf(("<-- dataLength=%d\n",pxDescriptor->xDataLength));
|
||||
|
||||
if( pxDescriptor->xDataLength >= PACKET_BUFFER_SIZE )
|
||||
{
|
||||
FreeRTOS_printf(("TX buffer length %d over %d\n", pxDescriptor->xDataLength, PACKET_BUFFER_SIZE));
|
||||
@ -272,7 +272,6 @@ static void prvEMACHandlerTask( void *pvParameters )
|
||||
if( pxBufferDescriptor != NULL )
|
||||
{
|
||||
memcpy( pxBufferDescriptor->pucEthernetBuffer, buffer, dataLength );
|
||||
// FreeRTOS_printf(("--> dataLength=%d\n",dataLength));
|
||||
pxBufferDescriptor->xDataLength = dataLength;
|
||||
} else {
|
||||
numaker_eth_rx_next();
|
||||
|
@ -252,7 +252,7 @@ int numaker_eth_init(uint8_t *mac_addr)
|
||||
init_tx_desc();
|
||||
init_rx_desc();
|
||||
|
||||
numaker_set_mac_addr(mac_addr); // need to reconfigure hardware address 'cos we just RESET emc...
|
||||
numaker_set_mac_addr(mac_addr); // need to reconfigure hardware address because we just RESET EMAC...
|
||||
|
||||
|
||||
/* Configure the MAC interrupt enable register. */
|
||||
@ -317,7 +317,7 @@ int numaker_eth_get_rx_buf(uint16_t *len, uint8_t **buf)
|
||||
unsigned int cur_entry, status;
|
||||
|
||||
cur_entry = EMAC->CRXDSA;
|
||||
if ((cur_entry == (uint32_t)cur_rx_desc_ptr) && (!(m_status & EMAC_INTSTS_RDUIF_Msk))) // cur_entry may equal to cur_rx_desc_ptr if RDU occures
|
||||
if ((cur_entry == (uint32_t)cur_rx_desc_ptr) && (!(m_status & EMAC_INTSTS_RDUIF_Msk))) // cur_entry may equal to cur_rx_desc_ptr if RDU occurred
|
||||
return -1;
|
||||
status = cur_rx_desc_ptr->status1;
|
||||
|
||||
|
@ -453,7 +453,7 @@ void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkB
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: prvLinkStatusChange ()
|
||||
* Description : Function will be called when the Link Status of the phy has changed ( see ether_callback.c )
|
||||
* Arguments : xStatus : true when statyus has become high
|
||||
* Arguments : xStatus : true when status has become high
|
||||
* Return Value : void
|
||||
**********************************************************************************************************************/
|
||||
void prvLinkStatusChange( BaseType_t xStatus )
|
||||
|
@ -221,15 +221,15 @@ DMA TX descriptors. */
|
||||
static SemaphoreHandle_t xTXDescriptorSemaphore = NULL;
|
||||
|
||||
/*
|
||||
* Note: it is adviced to define both
|
||||
* Note: it is advised to define both
|
||||
*
|
||||
* #define ipconfigZERO_COPY_RX_DRIVER 1
|
||||
* #define ipconfigZERO_COPY_TX_DRIVER 1
|
||||
*
|
||||
* The method using memcpy is slower and probaly uses more RAM memory.
|
||||
* The method using memcpy is slower and probably uses more RAM memory.
|
||||
* The possibility is left in the code just for comparison.
|
||||
*
|
||||
* It is adviced to define ETH_TXBUFNB at least 4. Note that no
|
||||
* It is advised to define ETH_TXBUFNB at least 4. Note that no
|
||||
* TX buffers are allocated in a zero-copy driver.
|
||||
*/
|
||||
/* MAC buffers: ---------------------------------------------------------*/
|
||||
@ -848,7 +848,7 @@ IPStackEvent_t xRxEvent;
|
||||
if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 1000 ) != pdPASS )
|
||||
{
|
||||
/* The buffer could not be sent to the stack so must be released again.
|
||||
This is a deferred handler taskr, not a real interrupt, so it is ok to
|
||||
This is a deferred handler task, not a real interrupt, so it is ok to
|
||||
use the task level function here. */
|
||||
#if( ipconfigUSE_LINKED_RX_MESSAGES != 0 )
|
||||
{
|
||||
@ -891,7 +891,7 @@ uint8_t *pucBuffer;
|
||||
while( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_OWN ) == 0u )
|
||||
{
|
||||
BaseType_t xAccepted = pdTRUE;
|
||||
/* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */
|
||||
/* Get the Frame Length of the received packet: subtract 4 bytes of the CRC */
|
||||
xReceivedLength = ( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_FL ) >> ETH_DMARXDESC_FRAMELENGTHSHIFT ) - 4;
|
||||
|
||||
pucBuffer = (uint8_t *) pxDMARxDescriptor->Buffer1Addr;
|
||||
@ -909,7 +909,7 @@ uint8_t *pucBuffer;
|
||||
|
||||
if( ( pxDMARxDescriptor->Status & ( ETH_DMARXDESC_CE | ETH_DMARXDESC_IPV4HCE | ETH_DMARXDESC_FT ) ) != ETH_DMARXDESC_FT )
|
||||
{
|
||||
/* Not an Ethernet frame-type or a checmsum error. */
|
||||
/* Not an Ethernet frame-type or a checksum error. */
|
||||
xAccepted = pdFALSE;
|
||||
}
|
||||
else
|
||||
@ -920,7 +920,7 @@ uint8_t *pucBuffer;
|
||||
|
||||
if( xAccepted != pdFALSE )
|
||||
{
|
||||
/* The packet wil be accepted, but check first if a new Network Buffer can
|
||||
/* The packet will be accepted, but check first if a new Network Buffer can
|
||||
be obtained. If not, the packet will still be dropped. */
|
||||
pxNewDescriptor = pxGetNetworkBufferWithDescriptor( ETH_RX_BUF_SIZE, xDescriptorWaitTime );
|
||||
|
||||
@ -942,8 +942,8 @@ uint8_t *pucBuffer;
|
||||
pxCurDescriptor = pxNewDescriptor;
|
||||
if( pxNewDescriptor != NULL )
|
||||
{
|
||||
/* The packet is acepted and a new Network Buffer was created,
|
||||
copy data to the Network Bufffer. */
|
||||
/* The packet is accepted and a new Network Buffer was created,
|
||||
copy data to the Network Buffer. */
|
||||
memcpy( pxNewDescriptor->pucEthernetBuffer, pucBuffer, xReceivedLength );
|
||||
}
|
||||
}
|
||||
|
@ -651,7 +651,7 @@ static const char *prvRemoveSpaces( char *pcBuffer, int aBuflen, const char *pcM
|
||||
{
|
||||
char *pcTarget = pcBuffer;
|
||||
|
||||
/* Utility function used to formap messages being printed only. */
|
||||
/* Utility function used to format messages being printed only. */
|
||||
while( ( *pcMessage != 0 ) && ( pcTarget < ( pcBuffer + aBuflen - 1 ) ) )
|
||||
{
|
||||
*( pcTarget++ ) = *pcMessage;
|
||||
|
@ -320,7 +320,7 @@ IPStackEvent_t xRxEvent;
|
||||
if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 1000 ) != pdPASS )
|
||||
{
|
||||
/* The buffer could not be sent to the stack so must be released again.
|
||||
This is a deferred handler taskr, not a real interrupt, so it is ok to
|
||||
This is a deferred handler task, not a real interrupt, so it is ok to
|
||||
use the task level function here. */
|
||||
#if( ipconfigUSE_LINKED_RX_MESSAGES != 0 )
|
||||
{
|
||||
|
@ -481,7 +481,7 @@ const uint32_t ulHz_Per_MHz = 1000000UL;
|
||||
|
||||
if( ( xEndTime - xStartTime ) > xMaxTime )
|
||||
{
|
||||
/* Wated more than xMaxTime, return. */
|
||||
/* Waited more than xMaxTime, return. */
|
||||
xReturn = pdFALSE;
|
||||
break;
|
||||
}
|
||||
|
@ -84,12 +84,12 @@
|
||||
#define REG_MAC_ADDR_5 (0x15) /* MARH */
|
||||
|
||||
#define REG_BUS_CLOCK_CTRL (0x20) /* OBCR */
|
||||
#define BUS_CLOCK_166 (0x0004) /* 166 MHz on-chip bus clock (defaul is 125MHz) */
|
||||
#define BUS_CLOCK_DIVIDEDBY_5 (0x0003) /* Bus clock devided by 5 */
|
||||
#define BUS_CLOCK_DIVIDEDBY_3 (0x0002) /* Bus clock devided by 3 */
|
||||
#define BUS_CLOCK_DIVIDEDBY_2 (0x0001) /* Bus clock devided by 2 */
|
||||
#define BUS_CLOCK_DIVIDEDBY_1 (0x0000) /* Bus clock devided by 1 */
|
||||
#define BUS_CLOCK_DIVIDED_MASK (0x0003) /* Bus clock devider mask */
|
||||
#define BUS_CLOCK_166 (0x0004) /* 166 MHz on-chip bus clock (default is 125MHz) */
|
||||
#define BUS_CLOCK_DIVIDEDBY_5 (0x0003) /* Bus clock divided by 5 */
|
||||
#define BUS_CLOCK_DIVIDEDBY_3 (0x0002) /* Bus clock divided by 3 */
|
||||
#define BUS_CLOCK_DIVIDEDBY_2 (0x0001) /* Bus clock divided by 2 */
|
||||
#define BUS_CLOCK_DIVIDEDBY_1 (0x0000) /* Bus clock divided by 1 */
|
||||
#define BUS_CLOCK_DIVIDED_MASK (0x0003) /* Bus clock divider mask */
|
||||
|
||||
#define BUS_SPEED_166_MHZ (0x0004) /* Set bus speed to 166 MHz */
|
||||
#define BUS_SPEED_125_MHZ (0x0000) /* Set bus speed to 125 MHz */
|
||||
@ -174,13 +174,13 @@
|
||||
#define TX_CTRL_IP_CHECKSUM (0x0020) /* Enable IP frame checksum generation */
|
||||
#define TX_CTRL_FLUSH_QUEUE (0x0010) /* Clear transmit queue, reset tx frame pointer */
|
||||
#define TX_CTRL_FLOW_ENABLE (0x0008) /* Enable transmit flow control */
|
||||
#define TX_CTRL_PAD_ENABLE (0x0004) /* Eanble adding a padding to a packet shorter than 64 bytes */
|
||||
#define TX_CTRL_PAD_ENABLE (0x0004) /* Enable adding a padding to a packet shorter than 64 bytes */
|
||||
#define TX_CTRL_CRC_ENABLE (0x0002) /* Enable adding a CRC to the end of transmit frame */
|
||||
#define TX_CTRL_ENABLE (0x0001) /* Enable tranmsit */
|
||||
#define TX_CTRL_ENABLE (0x0001) /* Enable transmit */
|
||||
|
||||
#define REG_TX_STATUS (0x72) /* TXSR */
|
||||
#define TX_STAT_LATE_COL (0x2000) /* Tranmsit late collision occurs */
|
||||
#define TX_STAT_MAX_COL (0x1000) /* Tranmsit maximum collision is reached */
|
||||
#define TX_STAT_LATE_COL (0x2000) /* Transmit late collision occurs */
|
||||
#define TX_STAT_MAX_COL (0x1000) /* Transmit maximum collision is reached */
|
||||
#define TX_FRAME_ID_MASK (0x003F) /* Transmit frame ID mask */
|
||||
#define TX_STAT_ERRORS ( TX_STAT_MAX_COL | TX_STAT_LATE_COL )
|
||||
|
||||
@ -191,7 +191,7 @@
|
||||
#define RX_CTRL_IP_CHECKSUM (0x1000) /* Enable IP frame checksum verification */
|
||||
#define RX_CTRL_MAC_FILTER (0x0800) /* Receive with address that pass MAC address filtering */
|
||||
#define RX_CTRL_FLOW_ENABLE (0x0400) /* Enable receive flow control */
|
||||
#define RX_CTRL_BAD_PACKET (0x0200) /* Eanble receive CRC error frames */
|
||||
#define RX_CTRL_BAD_PACKET (0x0200) /* Enable receive CRC error frames */
|
||||
#define RX_CTRL_MULTICAST (0x0100) /* Receive multicast frames that pass the CRC hash filtering */
|
||||
#define RX_CTRL_BROADCAST (0x0080) /* Receive all the broadcast frames */
|
||||
#define RX_CTRL_ALL_MULTICAST (0x0040) /* Receive all the multicast frames (including broadcast frames) */
|
||||
@ -232,7 +232,7 @@
|
||||
#define RX_PHY_ERROR (0x0010) /* Received frame has runt error */
|
||||
#define RX_FRAME_ETHER (0x0008) /* Received frame is an Ethernet-type frame */
|
||||
#define RX_TOO_LONG (0x0004) /* Received frame length exceeds max size 0f 2048 bytes */
|
||||
#define RX_RUNT_ERROR (0x0002) /* Received frame was demaged by a collision */
|
||||
#define RX_RUNT_ERROR (0x0002) /* Received frame was damaged by a collision */
|
||||
#define RX_BAD_CRC (0x0001) /* Received frame has a CRC error */
|
||||
#define RX_ERRORS ( RX_BAD_CRC | RX_TOO_LONG | RX_RUNT_ERROR | RX_PHY_ERROR | \
|
||||
RX_ICMP_ERROR | RX_IP_ERROR | RX_TCP_ERROR | RX_UDP_ERROR )
|
||||
@ -246,9 +246,9 @@
|
||||
#define TXQ_ENQUEUE (0x0001) /* Enable enqueue tx frames one frame at a time */
|
||||
|
||||
#define REG_RXQ_CMD (0x82) /* RXQCR */
|
||||
#define RXQ_STAT_TIME_INT (0x1000) /* RX interrupt is occured by timer duration */
|
||||
#define RXQ_STAT_BYTE_CNT_INT (0x0800) /* RX interrupt is occured by byte count threshold */
|
||||
#define RXQ_STAT_FRAME_CNT_INT (0x0400) /* RX interrupt is occured by frame count threshold */
|
||||
#define RXQ_STAT_TIME_INT (0x1000) /* RX interrupt is occurred by timer duration */
|
||||
#define RXQ_STAT_BYTE_CNT_INT (0x0800) /* RX interrupt is occurred by byte count threshold */
|
||||
#define RXQ_STAT_FRAME_CNT_INT (0x0400) /* RX interrupt is occurred by frame count threshold */
|
||||
#define RXQ_TWOBYTE_OFFSET (0x0200) /* Enable adding 2-byte before frame header for IP aligned with DWORD */
|
||||
#define RXQ_TIME_INT (0x0080) /* Enable RX interrupt by timer duration */
|
||||
#define RXQ_BYTE_CNT_INT (0x0040) /* Enable RX interrupt by byte count threshold */
|
||||
@ -373,7 +373,7 @@
|
||||
#define POWER_STATE_MASK (0x0003) /* Power management mode mask */
|
||||
|
||||
#define REG_WAKEUP_TIME (0xD6) /* GSWUTR */
|
||||
#define WAKEUP_TIME (0xFF00) /* Min time (sec) wake-uo after detected energy */
|
||||
#define WAKEUP_TIME (0xFF00) /* Min time (sec) wake-up after detected energy */
|
||||
#define GOSLEEP_TIME (0x00FF) /* Min time (sec) before goto sleep when in energy mode */
|
||||
|
||||
/*
|
||||
@ -457,7 +457,7 @@
|
||||
#define REG_PORT_STATUS (0xF8) /* P1SR */
|
||||
#define PORT_HP_MDIX (0x8000) /* Set PHY in HP auto MDI-X mode */
|
||||
#define PORT_REVERSED_POLARITY (0x2000) /* Polarity is reversed */
|
||||
#define PORT_RX_FLOW_CTRL (0x1000) /* Reeive flow control feature is active */
|
||||
#define PORT_RX_FLOW_CTRL (0x1000) /* Receive flow control feature is active */
|
||||
#define PORT_TX_FLOW_CTRL (0x0800) /* Transmit flow control feature is active */
|
||||
#define PORT_STAT_SPEED_100MBIT (0x0400) /* Link is 100Mbps */
|
||||
#define PORT_STAT_FULL_DUPLEX (0x0200) /* Link is full duplex mode */
|
||||
|
@ -35,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#include "NetworkBufferManagement.h"
|
||||
#include "FreeRTOS_Stream_Buffer.h"
|
||||
|
||||
/* ======================== Standard Library inludes ======================== */
|
||||
/* ======================== Standard Library includes ======================== */
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
@ -652,7 +652,7 @@ int ret;
|
||||
( void ) pvParam;
|
||||
|
||||
/* Disable signals to this thread since this is a Linux pthread to be able to
|
||||
* printf and other blocking operations without being interruped and put in
|
||||
* printf and other blocking operations without being interrupted and put in
|
||||
* suspension mode by the linux port signals
|
||||
*/
|
||||
sigset_t set;
|
||||
@ -689,7 +689,7 @@ const time_t xMaxMSToWait = 1000;
|
||||
|
||||
( void ) pvParam;
|
||||
|
||||
/* disable signals to avoid treating this thread as a FreeRTOS task and puting
|
||||
/* disable signals to avoid treating this thread as a FreeRTOS task and putting
|
||||
* it to sleep by the scheduler */
|
||||
sigset_t set;
|
||||
sigfillset( &set );
|
||||
@ -833,7 +833,7 @@ static void prvInterruptSimulatorTask( void *pvParameters )
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief remove spacces from pcMessage into pcBuffer
|
||||
* @brief remove spaces from pcMessage into pcBuffer
|
||||
* @param [out] pcBuffer buffer to fill up
|
||||
* @param [in] aBuflen length of pcBuffer
|
||||
* @param [in] pcMessage original message
|
||||
@ -845,7 +845,7 @@ static const char * prvRemoveSpaces( char *pcBuffer,
|
||||
{
|
||||
char *pcTarget = pcBuffer;
|
||||
|
||||
/* Utility function used to formap messages being printed only. */
|
||||
/* Utility function used to format messages being printed only. */
|
||||
while( ( *pcMessage != 0 ) && ( pcTarget < ( &pcBuffer[ aBuflen - 1 ] ) ) )
|
||||
{
|
||||
*( pcTarget++ ) = *pcMessage;
|
||||
|
@ -274,7 +274,7 @@
|
||||
iptraceNETWORK_INTERFACE_TRANSMIT();
|
||||
}
|
||||
|
||||
/* else same error occurred; this normally should not happen! But the buffer is left in there so it shold be freed! */
|
||||
/* else same error occurred; this normally should not happen! But the buffer is left in there so it should be freed! */
|
||||
|
||||
/* The buffer has been sent so can be released. */
|
||||
if( xReleaseAfterSend != pdFALSE )
|
||||
@ -767,7 +767,7 @@
|
||||
}
|
||||
|
||||
if( !pktSuccess )
|
||||
{ /* smth went wrong; nothing sent to the */
|
||||
{ /* something went wrong; nothing sent to the */
|
||||
if( pxBufferDescriptor != 0 )
|
||||
{
|
||||
pxBufferDescriptor->pucEthernetBuffer = 0;
|
||||
|
@ -175,7 +175,7 @@
|
||||
}
|
||||
|
||||
if( !pktSuccess )
|
||||
{ /* smth went wrong; nothing sent to the */
|
||||
{ /* something went wrong; nothing sent to the */
|
||||
if( pxNetworkBuffer != NULL )
|
||||
{
|
||||
pxNetworkBuffer->pucEthernetBuffer = 0;
|
||||
|
@ -98,7 +98,7 @@ static HANDLE pvProcessHandle;
|
||||
static UBaseType_t uxNextPacketNumber;
|
||||
static BaseType_t xFirstPacket = 1;
|
||||
|
||||
/* Bollean 'xDumpingReady' becomes true once all desired packet have been collected.
|
||||
/* Boolean 'xDumpingReady' becomes true once all desired packet have been collected.
|
||||
Further packets will be dropped (ignored). */
|
||||
static volatile BaseType_t xDumpingReady = pdFALSE;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
/*
|
||||
* tcp_mem_stats.c
|
||||
* Used to create a CSV file with detaild information about the memory usage of FreeRTOS+TCP.
|
||||
* Used to create a CSV file with detailed information about the memory usage of FreeRTOS+TCP.
|
||||
* See tools/tcp_mem_stats.md for further description.
|
||||
*/
|
||||
|
||||
|
@ -227,7 +227,7 @@ extern void vAssertCalled( const char * pcFile,
|
||||
|
||||
#define configPROFILING ( 0 )
|
||||
|
||||
/* Pseudo random number generater used by some demo tasks. */
|
||||
/* Pseudo random number generator used by some demo tasks. */
|
||||
extern uint32_t ulRand();
|
||||
#define configRAND32() ulRand()
|
||||
|
||||
|
@ -49,7 +49,7 @@ NetworkBufferDescriptor_t xNetworkBuffer;
|
||||
* passing this buffer along in the function call. vARPGenerateRequestPacket
|
||||
* casts the pointer xNetworkBuffer.pucEthernetBuffer into an ARPPacket_t pointer
|
||||
* and writes a complete ARPPacket to it. Therefore the buffer has to be at least of the size
|
||||
* of an ARPPacket to gurantee memory safety.
|
||||
* of an ARPPacket to guarantee memory safety.
|
||||
*/
|
||||
NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ){
|
||||
#ifdef CBMC_PROOF_ASSUMPTION_HOLDS
|
||||
|
@ -23,7 +23,7 @@ BaseType_t xTaskGetSchedulerState( void )
|
||||
return xState;
|
||||
}
|
||||
|
||||
/* This function is another method apart from overwritting the defines to init the max
|
||||
/* This function is another method apart from overwriting the defines to init the max
|
||||
loop bound. */
|
||||
void vInitTaskCheckForTimeOut(BaseType_t maxCounter, BaseType_t maxCounter_limit)
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ int32_t FreeRTOS_recvfrom( Socket_t xSocket,
|
||||
|
||||
{
|
||||
/****************************************************************
|
||||
* "If the zero copy calling semantics are used (the ulFlasg
|
||||
* "If the zero copy calling semantics are used (the ulFlags
|
||||
* parameter does not have the FREERTOS_ZERO_COPY bit set) then
|
||||
* pvBuffer does not point to a buffer and xBufferLength is not
|
||||
* used." This is from the documentation.
|
||||
|
Reference in New Issue
Block a user