clean up lwip
This commit is contained in:
8
vendor/lwip/lpclwip/arch/cc.h
vendored
8
vendor/lwip/lpclwip/arch/cc.h
vendored
@@ -33,6 +33,7 @@
|
|||||||
#define __CC_H__
|
#define __CC_H__
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "common/assertion.h"
|
||||||
|
|
||||||
/* Types based on stdint.h */
|
/* Types based on stdint.h */
|
||||||
typedef uint8_t u8_t;
|
typedef uint8_t u8_t;
|
||||||
@@ -86,14 +87,13 @@ typedef uintptr_t mem_ptr_t;
|
|||||||
#define LWIP_CHKSUM_ALGORITHM 1
|
#define LWIP_CHKSUM_ALGORITHM 1
|
||||||
|
|
||||||
#ifdef LWIP_DEBUG
|
#ifdef LWIP_DEBUG
|
||||||
void assert_printf(char *msg, int line, char *file);
|
|
||||||
|
|
||||||
/* Plaform specific diagnostic output */
|
/* Plaform specific diagnostic output */
|
||||||
#define LWIP_PLATFORM_DIAG(vars) printf vars
|
#define LWIP_PLATFORM_DIAG(vars) printf(vars)
|
||||||
#define LWIP_PLATFORM_ASSERT(flag) { assert_printf((flag), __LINE__, __FILE__); }
|
#define LWIP_PLATFORM_ASSERT(flag) hal_debugger_breakpoint()
|
||||||
#else
|
#else
|
||||||
#define LWIP_PLATFORM_DIAG(msg) { ; }
|
#define LWIP_PLATFORM_DIAG(msg) { ; }
|
||||||
#define LWIP_PLATFORM_ASSERT(flag) { while (1); }
|
#define LWIP_PLATFORM_ASSERT(flag) hal_debugger_breakpoint()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __CC_H__ */
|
#endif /* __CC_H__ */
|
||||||
|
15
vendor/lwip/lpclwip/arch/lpc18xx_43xx_emac.c
vendored
15
vendor/lwip/lpclwip/arch/lpc18xx_43xx_emac.c
vendored
@@ -891,13 +891,13 @@ static err_t low_level_init(struct netif *netif)
|
|||||||
|
|
||||||
/* Reset MAC Subsystem internal registers and logic */
|
/* Reset MAC Subsystem internal registers and logic */
|
||||||
LPC_ETHERNET->DMA_BUS_MODE |= DMA_BM_SWR;
|
LPC_ETHERNET->DMA_BUS_MODE |= DMA_BM_SWR;
|
||||||
timeout = 3;
|
// timeout = 3;
|
||||||
while (LPC_ETHERNET->DMA_BUS_MODE & DMA_BM_SWR) {
|
// while (LPC_ETHERNET->DMA_BUS_MODE & DMA_BM_SWR) {
|
||||||
msDelay(1);
|
// msDelay(1);
|
||||||
timeout--;
|
// timeout--;
|
||||||
if (timeout == 0)
|
// if (timeout == 0)
|
||||||
return ERR_TIMEOUT;
|
// return ERR_TIMEOUT;
|
||||||
}
|
// }
|
||||||
LPC_ETHERNET->DMA_BUS_MODE = DMA_BM_ATDS | DMA_BM_PBL(1) | DMA_BM_RPBL(1);
|
LPC_ETHERNET->DMA_BUS_MODE = DMA_BM_ATDS | DMA_BM_PBL(1) | DMA_BM_RPBL(1);
|
||||||
|
|
||||||
/* Save MAC address */
|
/* Save MAC address */
|
||||||
@@ -1020,6 +1020,7 @@ err_t lpc_etharp_output(struct netif *netif, struct pbuf *q,
|
|||||||
* ERR_MEM if private data couldn't be allocated
|
* ERR_MEM if private data couldn't be allocated
|
||||||
* any other err_t on error
|
* any other err_t on error
|
||||||
*/
|
*/
|
||||||
|
void boardGetMACaddr(uint8_t *macaddr); // FIXME ethernet
|
||||||
err_t lpc_enetif_init(struct netif *netif)
|
err_t lpc_enetif_init(struct netif *netif)
|
||||||
{
|
{
|
||||||
err_t err;
|
err_t err;
|
||||||
|
63
vendor/lwip/lpclwip/arch/lpc_debug.c
vendored
63
vendor/lwip/lpclwip/arch/lpc_debug.c
vendored
@@ -1,63 +0,0 @@
|
|||||||
/**********************************************************************
|
|
||||||
* $Id$ lpc_debug.c 2011-11-20
|
|
||||||
*//**
|
|
||||||
* @file lpc_debug.c
|
|
||||||
* @brief LWIP debug re-direction
|
|
||||||
* @version 1.0
|
|
||||||
* @date 20. Nov. 2011
|
|
||||||
* @author NXP MCU SW Application Team
|
|
||||||
*
|
|
||||||
* Copyright(C) 2011, NXP Semiconductor
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
***********************************************************************
|
|
||||||
* Software that is described herein is for illustrative purposes only
|
|
||||||
* which provides customers with programming information regarding the
|
|
||||||
* products. This software is supplied "AS IS" without any warranties.
|
|
||||||
* NXP Semiconductors assumes no responsibility or liability for the
|
|
||||||
* use of the software, conveys no license or title under any patent,
|
|
||||||
* copyright, or mask work right to the product. NXP Semiconductors
|
|
||||||
* reserves the right to make changes in the software without
|
|
||||||
* notification. NXP Semiconductors also make no representation or
|
|
||||||
* warranty that such application will be suitable for the specified
|
|
||||||
* use without further testing or modification.
|
|
||||||
**********************************************************************/
|
|
||||||
|
|
||||||
#include "lwip/opt.h"
|
|
||||||
|
|
||||||
/** @ingroup lwip_lpc_debug
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef LWIP_DEBUG
|
|
||||||
|
|
||||||
/** \brief Displays an error message on assertion
|
|
||||||
|
|
||||||
This function will display an error message on an assertion
|
|
||||||
to the debug output.
|
|
||||||
|
|
||||||
\param[in] msg Error message to display
|
|
||||||
\param[in] line Line number in file with error
|
|
||||||
\param[in] file Filename with error
|
|
||||||
*/
|
|
||||||
void assert_printf(char *msg, int line, char *file)
|
|
||||||
{
|
|
||||||
if (msg) {
|
|
||||||
LWIP_DEBUGF(LWIP_DBG_ON, ("%s:%d in file %s\n", msg, line, file));
|
|
||||||
while (1) {
|
|
||||||
/* Fast LED flash */
|
|
||||||
led_set(0);
|
|
||||||
msDelay(100);
|
|
||||||
led_set(1);
|
|
||||||
msDelay(100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* LWIP_DEBUG */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* --------------------------------- End Of File ------------------------------ */
|
|
1
vendor/lwip/lpclwip/lpc_phy_lan8720.c
vendored
1
vendor/lwip/lpclwip/lpc_phy_lan8720.c
vendored
@@ -29,6 +29,7 @@
|
|||||||
#include "lwip/snmp.h"
|
#include "lwip/snmp.h"
|
||||||
|
|
||||||
#include "boards/board.h"
|
#include "boards/board.h"
|
||||||
|
#include "arch/lpc_arch.h" // FIXME Ethernet
|
||||||
#include "lpc_phy.h"
|
#include "lpc_phy.h"
|
||||||
|
|
||||||
/** @defgroup lan8720_phy PHY status and control for the LAN8720.
|
/** @defgroup lan8720_phy PHY status and control for the LAN8720.
|
||||||
|
1
vendor/lwip/lwip/src/core/mem.c
vendored
1
vendor/lwip/lwip/src/core/mem.c
vendored
@@ -179,6 +179,7 @@ struct mem {
|
|||||||
* how that space is calculated). */
|
* how that space is calculated). */
|
||||||
#ifndef LWIP_RAM_HEAP_POINTER
|
#ifndef LWIP_RAM_HEAP_POINTER
|
||||||
/** the heap. we need one struct mem at the end and some room for alignment */
|
/** the heap. we need one struct mem at the end and some room for alignment */
|
||||||
|
__attribute__ ((section(".data.$RAM4")))
|
||||||
u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT];
|
u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT];
|
||||||
#define LWIP_RAM_HEAP_POINTER ram_heap
|
#define LWIP_RAM_HEAP_POINTER ram_heap
|
||||||
#endif /* LWIP_RAM_HEAP_POINTER */
|
#endif /* LWIP_RAM_HEAP_POINTER */
|
||||||
|
Reference in New Issue
Block a user