]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/lpc18xx_43xx_EMAC_LPCOpen.h
***IMMINENT RELEASE NOTICE***
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-UDP / portable / NetworkInterface / LPC18xx / Using_LPCOpen_Library / lpc18xx_43xx_EMAC_LPCOpen.h
1 /*\r
2  * FreeRTOS+UDP V1.0.4 (C) 2014 Real Time Engineers ltd.\r
3  * All rights reserved\r
4  *\r
5  * This file is part of the FreeRTOS+UDP distribution.  The FreeRTOS+UDP license\r
6  * terms are different to the FreeRTOS license terms.\r
7  *\r
8  * FreeRTOS+UDP uses a dual license model that allows the software to be used\r
9  * under a standard GPL open source license, or a commercial license.  The\r
10  * standard GPL license (unlike the modified GPL license under which FreeRTOS\r
11  * itself is distributed) requires that all software statically linked with\r
12  * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.\r
13  * Details of both license options follow:\r
14  *\r
15  * - Open source licensing -\r
16  * FreeRTOS+UDP is a free download and may be used, modified, evaluated and\r
17  * distributed without charge provided the user adheres to version two of the\r
18  * GNU General Public License (GPL) and does not remove the copyright notice or\r
19  * this text.  The GPL V2 text is available on the gnu.org web site, and on the\r
20  * following URL: http://www.FreeRTOS.org/gpl-2.0.txt.\r
21  *\r
22  * - Commercial licensing -\r
23  * Businesses and individuals that for commercial or other reasons cannot comply\r
24  * with the terms of the GPL V2 license must obtain a commercial license before\r
25  * incorporating FreeRTOS+UDP into proprietary software for distribution in any\r
26  * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp\r
27  * and do not require any source files to be changed.\r
28  *\r
29  * FreeRTOS+UDP is distributed in the hope that it will be useful.  You cannot\r
30  * use FreeRTOS+UDP unless you agree that you use the software 'as is'.\r
31  * FreeRTOS+UDP is provided WITHOUT ANY WARRANTY; without even the implied\r
32  * warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR\r
33  * PURPOSE. Real Time Engineers Ltd. disclaims all conditions and terms, be they\r
34  * implied, expressed, or statutory.\r
35  *\r
36  * 1 tab == 4 spaces!\r
37  *\r
38  * http://www.FreeRTOS.org\r
39  * http://www.FreeRTOS.org/udp\r
40  *\r
41  */\r
42 \r
43 #ifndef LPC18xx_43xx_EMAC_H\r
44 #define LPC18xx_43xx_EMAC_H\r
45 \r
46 /*\r
47  * Initialise the MAC and PHY.\r
48  */\r
49 BaseType_t xEMACInit( uint8_t ucMACAddress[ 6 ] );\r
50 \r
51 /*\r
52  * Return pdTRUE if there is a FreeRTOS Tx descriptor.  Return pdFALSE if all\r
53  * Tx descriptors are already in use.\r
54  */\r
55 BaseType_t xEMACIsTxDescriptorAvailable( void );\r
56 \r
57 /*\r
58  * Assign a buffer to a Tx descriptor so it is ready to be transmitted, but\r
59  * don't start the transmission yet.\r
60  */\r
61 void vEMACAssignBufferToDescriptor( uint8_t * pucBuffer );\r
62 \r
63 /*\r
64  * Start transmitting the buffer pointed to by the next Tx descriptor.  The\r
65  * buffer must have first been allocated to the Tx descriptor using a call to\r
66  * vEMACAssignBufferToDescriptor().\r
67  */\r
68 void vEMACStartNextTransmission( uint32_t ulLength );\r
69 \r
70 /*\r
71  * The data pointed to by the Rx descriptor has been consumed, and the Rx\r
72  * descriptor can be returned to the control of the DMS.\r
73  */\r
74 void vEMACReturnRxDescriptor( void );\r
75 \r
76 /*\r
77  * Returns pdTRUE if the next Rx descriptor contains received data.  Returns\r
78  * pdFLASE fi the next Rx descriptor is still under the control of the DMA.\r
79  */\r
80 BaseType_t xEMACRxDataAvailable( void );\r
81 void vEMACSwapEmptyBufferForRxedData( xNetworkBufferDescriptor_t *pxNetworkBuffer );\r
82 \r
83 #endif /* LPC18xx_43xx_EMAC_H */\r
84 \r