| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Modules | Functions | Variables
LPC18xx/43xx HTTP Server dual core example using LWIP ethernet stack
LPC43xx dual core examples

## Detailed Description

Example description
The LWIP HTTP Server example demonstrates the HTTP Server example using LWIP ethernet stack. The HTTP server can be configured to run on any of the cores (M4 or M0). The user should connect the board to the network by using the ethernet cable. The board will get an IP address by using DHCP method. The use can access the HTTP Server by using a web browser from the host PC.
If the USB Mass storage is compiled in the application (on either M0/M4 core), then it will read the HTTP contents from USB Mass storage disk & provided to the user. If the USB Mass storage is not compiled in the application (on either M0/M4 core), then the default HTTP page will be displayed.
In FreeRTOS/uCOS-III configurations, the net_conn API interface will be used. In stand-alone configuration, HTTPD interface will be used.

Special connection requirements
There are no special connection requirements for this example.

Build procedures:
LPC18xx/43xx example quickstart for Keil uVision4
LPC18xx/43xx example quickstart for IAR EWARM
LPC18xx/43xx example quickstart for Code Red Xpresso

Supported boards and board setup:
Hitex 1850 evaluation boards
Hitex 4350 evaluation boards
Keil 1857 evaluation boards
Keil 4357 evaluation boards
NGX 1830 Xplorer boards
NGX 4330 Xplorer boards

Submitting LPCOpen issues:
Community support for LPCOpen

## Modules
| Filesystem Glue logic for reading http files

## Functions
static void | ip_addr_changed (const struct netif *nwif)
void | lcd_update_hostip (uint32_t host_ip)
void | LWIP_Init (void)
| lwIP dual core example initialisation function
void | lwip_tasks (void)
| LWIP Task function.
WEAK_SYMBOL void | EVENT_lwip_addr_changed (uint32_t new_addr)
| Event handler to notify IP address change to other tasks This is a weak function implementation, other tasks/applicaitons can override the function with its own implementation.

## Variables
static struct netif | lpc_netif

## Function Documentation

WEAK_SYMBOL void EVENT_lwip_addr_changed | ( | uint32_t | new_addr | ) |

Event handler to notify IP address change to other tasks This is a weak function implementation, other tasks/applicaitons can override the function with its own implementation.

Parameters

  new_addr | : New IP address obtained from DHCP

Returns
  None

static void ip_addr_changed | ( | const struct netif * | nwif | ) |
| static

Definition at line 130 of file dualcore_webserver.c.

void lcd_update_hostip | ( | uint32_t | host_ip | ) |

void LWIP_Init | ( | void |  | ) |

lwIP dual core example initialisation function

This function initializes the lwIP interface (ethernet etc.). In stand-alone configuration, this function will enable the tick functionality. It will initialises the LWIP stack, initialises the network interface, initialises the DHCP & HTTPD functions. In FreeRTOS/uCOS-III configurations, it does nothing as the initialization is handed by the corresponding tasks. This function is called by main() only when EXAMPLE_LWIP is defined.

Returns
  None

Definition at line 285 of file dualcore_webserver.c.

void lwip_tasks | ( | void |  | ) |

LWIP Task function.

Function that creates/performs the lwIP stack functionality. In stand-alone configuration, this function will monitor the link status and handles the packets. In FreeRTOS/uCOS-III configurations, it will create the network interface task. Called by dual core main() only when EXAMPLE_LWIP is defined.

Returns
  None

Definition at line 372 of file dualcore_webserver.c.

## Variable Documentation

struct netif lpc_netif
| static

Definition at line 124 of file dualcore_webserver.c.