These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers hello-world.h Source File

hello-world.h

Go to the documentation of this file.
00001 /** @addtogroup EMAC_uIP
00002  * @{
00003  */
00004 
00005 /**
00006  * \addtogroup apps
00007  * @{
00008  */
00009 
00010 /**
00011  * \defgroup helloworld Hello, world
00012  * @{
00013  *
00014  * A small example showing how to write applications with
00015  * \ref psock "protosockets".
00016  */
00017 
00018 /**
00019  * \file
00020  *         Header file for an example of how to write uIP applications
00021  *         with protosockets.
00022  * \author
00023  *         Adam Dunkels <adam@sics.se>
00024  */
00025 
00026 #ifndef __HELLO_WORLD_H__
00027 #define __HELLO_WORLD_H__
00028 
00029 /* Since this file will be included by uip.h, we cannot include uip.h
00030    here. But we might need to include uipopt.h if we need the u8_t and
00031    u16_t datatypes. */
00032 #include "uipopt.h"
00033 
00034 #include "psock.h"
00035 
00036 /* Next, we define the uip_tcp_appstate_t datatype. This is the state
00037    of our application, and the memory required for this state is
00038    allocated together with each TCP connection. One application state
00039    for each TCP connection. */
00040 typedef struct hello_world_state {
00041   struct psock p;
00042   char inputbuffer[10];
00043   char name[40];
00044 } uip_tcp_appstate_t;
00045 
00046 /* Finally we define the application function to be called by uIP. */
00047 void hello_world_appcall(void);
00048 #ifndef UIP_APPCALL
00049 #define UIP_APPCALL hello_world_appcall
00050 #endif /* UIP_APPCALL */
00051 
00052 void hello_world_init(void);
00053 
00054 #endif /* __HELLO_WORLD_H__ */
00055 /** @} */
00056 /** @} */
00057 /** @} */
00058 /** @} */