mbed client on ethernet with LWIP

Dependencies:   mbed Socket lwip-eth lwip-sys lwip

Fork of mbed-client-classic-example-lwip by sandbox

Committer:
mbedAustin
Date:
Thu Jun 09 17:08:36 2016 +0000
Revision:
11:cada08fc8a70
Commit for public Consumption

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbedAustin 11:cada08fc8a70 1 #ifndef OS_TCB_H
mbedAustin 11:cada08fc8a70 2 #define OS_TCB_H
mbedAustin 11:cada08fc8a70 3
mbedAustin 11:cada08fc8a70 4 /* Types */
mbedAustin 11:cada08fc8a70 5 typedef char S8;
mbedAustin 11:cada08fc8a70 6 typedef unsigned char U8;
mbedAustin 11:cada08fc8a70 7 typedef short S16;
mbedAustin 11:cada08fc8a70 8 typedef unsigned short U16;
mbedAustin 11:cada08fc8a70 9 typedef int S32;
mbedAustin 11:cada08fc8a70 10 typedef unsigned int U32;
mbedAustin 11:cada08fc8a70 11 typedef long long S64;
mbedAustin 11:cada08fc8a70 12 typedef unsigned long long U64;
mbedAustin 11:cada08fc8a70 13 typedef unsigned char BIT;
mbedAustin 11:cada08fc8a70 14 typedef unsigned int BOOL;
mbedAustin 11:cada08fc8a70 15 typedef void (*FUNCP)(void);
mbedAustin 11:cada08fc8a70 16 #define TCB_STACK_LR_OFFSET_BYTES (14*4) // prelast DWORD
mbedAustin 11:cada08fc8a70 17 #define TCB_STACK_LR_OFFSET_DWORDS (14) // prelast DWORD
mbedAustin 11:cada08fc8a70 18 #define TCB_STACK_R0_OFFSET_BYTES (1*4) // second DWORD
mbedAustin 11:cada08fc8a70 19 #define TCB_STACK_R0_OFFSET_DWORDS (1) // second DWORD
mbedAustin 11:cada08fc8a70 20
mbedAustin 11:cada08fc8a70 21 typedef struct OS_TCB {
mbedAustin 11:cada08fc8a70 22 /* General part: identical for all implementations. */
mbedAustin 11:cada08fc8a70 23 U8 cb_type; /* Control Block Type */
mbedAustin 11:cada08fc8a70 24 U8 state; /* Task state */
mbedAustin 11:cada08fc8a70 25 U8 prio; /* Execution priority */
mbedAustin 11:cada08fc8a70 26 U8 task_id; /* Task ID value for optimized TCB access */
mbedAustin 11:cada08fc8a70 27 struct OS_TCB *p_lnk; /* Link pointer for ready/sem. wait list */
mbedAustin 11:cada08fc8a70 28 struct OS_TCB *p_rlnk; /* Link pointer for sem./mbx lst backwards */
mbedAustin 11:cada08fc8a70 29 struct OS_TCB *p_dlnk; /* Link pointer for delay list */
mbedAustin 11:cada08fc8a70 30 struct OS_TCB *p_blnk; /* Link pointer for delay list backwards */
mbedAustin 11:cada08fc8a70 31 U16 delta_time; /* Time until time out */
mbedAustin 11:cada08fc8a70 32 U16 interval_time; /* Time interval for periodic waits */
mbedAustin 11:cada08fc8a70 33 U16 events; /* Event flags */
mbedAustin 11:cada08fc8a70 34 U16 waits; /* Wait flags */
mbedAustin 11:cada08fc8a70 35 void **msg; /* Direct message passing when task waits */
mbedAustin 11:cada08fc8a70 36
mbedAustin 11:cada08fc8a70 37 /* Hardware dependant part: specific for CM processor */
mbedAustin 11:cada08fc8a70 38 U8 stack_frame; /* Stack frame: 0=Basic, 1=Extended */
mbedAustin 11:cada08fc8a70 39 U8 reserved1;
mbedAustin 11:cada08fc8a70 40 U16 reserved2;
mbedAustin 11:cada08fc8a70 41 U32 priv_stack; /* Private stack size in bytes */
mbedAustin 11:cada08fc8a70 42 U32 tsk_stack; /* Current task Stack pointer (R13) */
mbedAustin 11:cada08fc8a70 43 U32 *stack; /* Pointer to Task Stack memory block */
mbedAustin 11:cada08fc8a70 44
mbedAustin 11:cada08fc8a70 45 /* Library dependant part */
mbedAustin 11:cada08fc8a70 46 #if defined (__CC_ARM) && !defined (__MICROLIB)
mbedAustin 11:cada08fc8a70 47 /* A memory space for arm standard library. */
mbedAustin 11:cada08fc8a70 48 U32 std_libspace[96/4];
mbedAustin 11:cada08fc8a70 49 #endif
mbedAustin 11:cada08fc8a70 50
mbedAustin 11:cada08fc8a70 51 /* Task entry point used for uVision debugger */
mbedAustin 11:cada08fc8a70 52 FUNCP ptask; /* Task entry address */
mbedAustin 11:cada08fc8a70 53 } *P_TCB;
mbedAustin 11:cada08fc8a70 54
mbedAustin 11:cada08fc8a70 55 #endif