@ -5,11 +5,11 @@
* This file is part of the FreeRTOS + UDP distribution . The FreeRTOS + UDP license
* This file is part of the FreeRTOS + UDP distribution . The FreeRTOS + UDP license
* terms are different to the FreeRTOS license terms .
* terms are different to the FreeRTOS license terms .
*
*
* FreeRTOS + UDP uses a dual license model that allows the software to be used
* FreeRTOS + UDP uses a dual license model that allows the software to be used
* under a standard GPL open source license , or a commercial license . The
* under a standard GPL open source license , or a commercial license . The
* standard GPL license ( unlike the modified GPL license under which FreeRTOS
* standard GPL license ( unlike the modified GPL license under which FreeRTOS
* itself is distributed ) requires that all software statically linked with
* itself is distributed ) requires that all software statically linked with
* FreeRTOS + UDP is also distributed under the same GPL V2 license terms .
* FreeRTOS + UDP is also distributed under the same GPL V2 license terms .
* Details of both license options follow :
* Details of both license options follow :
*
*
* - Open source licensing -
* - Open source licensing -
@ -21,9 +21,9 @@
*
*
* - Commercial licensing -
* - Commercial licensing -
* Businesses and individuals that for commercial or other reasons cannot comply
* Businesses and individuals that for commercial or other reasons cannot comply
* with the terms of the GPL V2 license must obtain a commercial license before
* with the terms of the GPL V2 license must obtain a commercial license before
* incorporating FreeRTOS + UDP into proprietary software for distribution in any
* incorporating FreeRTOS + UDP into proprietary software for distribution in any
* form . Commercial licenses can be purchased from http : //shop.freertos.org/udp
* form . Commercial licenses can be purchased from http : //shop.freertos.org/udp
* and do not require any source files to be changed .
* and do not require any source files to be changed .
*
*
* FreeRTOS + UDP is distributed in the hope that it will be useful . You cannot
* FreeRTOS + UDP is distributed in the hope that it will be useful . You cannot
@ -117,7 +117,7 @@ this case the network buffers are declared in NetworkInterface.c because, as
this file is only used on Windows machines , wasting a few bytes in buffers that
this file is only used on Windows machines , wasting a few bytes in buffers that
never get used does not matter ( the buffers will not get used if the dynamic
never get used does not matter ( the buffers will not get used if the dynamic
payload allocation file is included in the project ) . */
payload allocation file is included in the project ) . */
static uint8_t ucBuffers [ ipconfigNUM_NETWORK_BUFFERS ] [ ipTOTAL_ETHERNET_FRAME_SIZE ] ;
static uint8_t ucBuffers [ ipconfigNUM_NETWORK_BUFFERS ] [ ipTOTAL_ETHERNET_FRAME_SIZE + ipBUFFER_PADDING ] ;
/* The queue used to communicate Ethernet events with the IP task. */
/* The queue used to communicate Ethernet events with the IP task. */
extern xQueueHandle xNetworkEventQueue ;
extern xQueueHandle xNetworkEventQueue ;
@ -472,10 +472,18 @@ eFrameProcessingResult_t eResult;
void vNetworkInterfaceAllocateRAMToBuffers ( xNetworkBufferDescriptor_t pxNetworkBuffers [ ipconfigNUM_NETWORK_BUFFERS ] )
void vNetworkInterfaceAllocateRAMToBuffers ( xNetworkBufferDescriptor_t pxNetworkBuffers [ ipconfigNUM_NETWORK_BUFFERS ] )
{
{
BaseType_t x ;
BaseType_t x ;
xNetworkBufferDescriptor_t * * ppxStartOfBuffer ;
for ( x = 0 ; x < ipconfigNUM_NETWORK_BUFFERS ; x + + )
for ( x = 0 ; x < ipconfigNUM_NETWORK_BUFFERS ; x + + )
{
{
pxNetworkBuffers [ x ] . pucEthernetBuffer = & ( ucBuffers [ x ] [ 0 ] ) ;
/* Place a pointer to the network buffer structure at the beginning
of the buffer that will be allocated to the structure . */
ppxStartOfBuffer = ( xNetworkBufferDescriptor_t * * ) & ( ucBuffers [ x ] [ 0 ] ) ;
* ppxStartOfBuffer = & ( pxNetworkBuffers [ x ] ) ;
/* Allocate the buffer to the network buffer structure, jumping over
the bytes where the pointer to the network buffer is now stored . */
pxNetworkBuffers [ x ] . pucEthernetBuffer = & ( ucBuffers [ x ] [ ipBUFFER_PADDING ] ) ;
}
}
}
}
# endif
# endif