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

Committer:
frank26080115
Date:
Sun Mar 20 05:38:56 2011 +0000
Revision:
0:bf7b9fba3924

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
frank26080115 0:bf7b9fba3924 1 /** @addtogroup EMAC_uIP
frank26080115 0:bf7b9fba3924 2 * @{
frank26080115 0:bf7b9fba3924 3 */
frank26080115 0:bf7b9fba3924 4
frank26080115 0:bf7b9fba3924 5 /**
frank26080115 0:bf7b9fba3924 6 * \addtogroup apps
frank26080115 0:bf7b9fba3924 7 * @{
frank26080115 0:bf7b9fba3924 8 */
frank26080115 0:bf7b9fba3924 9
frank26080115 0:bf7b9fba3924 10 /**
frank26080115 0:bf7b9fba3924 11 * \defgroup helloworld Hello, world
frank26080115 0:bf7b9fba3924 12 * @{
frank26080115 0:bf7b9fba3924 13 *
frank26080115 0:bf7b9fba3924 14 * A small example showing how to write applications with
frank26080115 0:bf7b9fba3924 15 * \ref psock "protosockets".
frank26080115 0:bf7b9fba3924 16 */
frank26080115 0:bf7b9fba3924 17
frank26080115 0:bf7b9fba3924 18 /**
frank26080115 0:bf7b9fba3924 19 * \file
frank26080115 0:bf7b9fba3924 20 * Header file for an example of how to write uIP applications
frank26080115 0:bf7b9fba3924 21 * with protosockets.
frank26080115 0:bf7b9fba3924 22 * \author
frank26080115 0:bf7b9fba3924 23 * Adam Dunkels <adam@sics.se>
frank26080115 0:bf7b9fba3924 24 */
frank26080115 0:bf7b9fba3924 25
frank26080115 0:bf7b9fba3924 26 #ifndef __HELLO_WORLD_H__
frank26080115 0:bf7b9fba3924 27 #define __HELLO_WORLD_H__
frank26080115 0:bf7b9fba3924 28
frank26080115 0:bf7b9fba3924 29 /* Since this file will be included by uip.h, we cannot include uip.h
frank26080115 0:bf7b9fba3924 30 here. But we might need to include uipopt.h if we need the u8_t and
frank26080115 0:bf7b9fba3924 31 u16_t datatypes. */
frank26080115 0:bf7b9fba3924 32 #include "uipopt.h"
frank26080115 0:bf7b9fba3924 33
frank26080115 0:bf7b9fba3924 34 #include "psock.h"
frank26080115 0:bf7b9fba3924 35
frank26080115 0:bf7b9fba3924 36 /* Next, we define the uip_tcp_appstate_t datatype. This is the state
frank26080115 0:bf7b9fba3924 37 of our application, and the memory required for this state is
frank26080115 0:bf7b9fba3924 38 allocated together with each TCP connection. One application state
frank26080115 0:bf7b9fba3924 39 for each TCP connection. */
frank26080115 0:bf7b9fba3924 40 typedef struct hello_world_state {
frank26080115 0:bf7b9fba3924 41 struct psock p;
frank26080115 0:bf7b9fba3924 42 char inputbuffer[10];
frank26080115 0:bf7b9fba3924 43 char name[40];
frank26080115 0:bf7b9fba3924 44 } uip_tcp_appstate_t;
frank26080115 0:bf7b9fba3924 45
frank26080115 0:bf7b9fba3924 46 /* Finally we define the application function to be called by uIP. */
frank26080115 0:bf7b9fba3924 47 void hello_world_appcall(void);
frank26080115 0:bf7b9fba3924 48 #ifndef UIP_APPCALL
frank26080115 0:bf7b9fba3924 49 #define UIP_APPCALL hello_world_appcall
frank26080115 0:bf7b9fba3924 50 #endif /* UIP_APPCALL */
frank26080115 0:bf7b9fba3924 51
frank26080115 0:bf7b9fba3924 52 void hello_world_init(void);
frank26080115 0:bf7b9fba3924 53
frank26080115 0:bf7b9fba3924 54 #endif /* __HELLO_WORLD_H__ */
frank26080115 0:bf7b9fba3924 55 /** @} */
frank26080115 0:bf7b9fba3924 56 /** @} */
frank26080115 0:bf7b9fba3924 57 /** @} */
frank26080115 0:bf7b9fba3924 58 /** @} */