mbed client lightswitch demo

Dependencies:   mbed Socket lwip-eth lwip-sys lwip

Fork of mbed-client-classic-example-lwip by Austin Blackstone

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
mbedAustin 11:cada08fc8a70 17 typedef struct OS_TCB {
mbedAustin 11:cada08fc8a70 18 /* General part: identical for all implementations. */
mbedAustin 11:cada08fc8a70 19 U8 cb_type; /* Control Block Type */
mbedAustin 11:cada08fc8a70 20 U8 state; /* Task state */
mbedAustin 11:cada08fc8a70 21 U8 prio; /* Execution priority */
mbedAustin 11:cada08fc8a70 22 U8 task_id; /* Task ID value for optimized TCB access */
mbedAustin 11:cada08fc8a70 23 struct OS_TCB *p_lnk; /* Link pointer for ready/sem. wait list */
mbedAustin 11:cada08fc8a70 24 struct OS_TCB *p_rlnk; /* Link pointer for sem./mbx lst backwards */
mbedAustin 11:cada08fc8a70 25 struct OS_TCB *p_dlnk; /* Link pointer for delay list */
mbedAustin 11:cada08fc8a70 26 struct OS_TCB *p_blnk; /* Link pointer for delay list backwards */
mbedAustin 11:cada08fc8a70 27 U16 delta_time; /* Time until time out */
mbedAustin 11:cada08fc8a70 28 U16 interval_time; /* Time interval for periodic waits */
mbedAustin 11:cada08fc8a70 29 U16 events; /* Event flags */
mbedAustin 11:cada08fc8a70 30 U16 waits; /* Wait flags */
mbedAustin 11:cada08fc8a70 31 void **msg; /* Direct message passing when task waits */
mbedAustin 11:cada08fc8a70 32
mbedAustin 11:cada08fc8a70 33 /* Hardware dependant part: specific for CM processor */
mbedAustin 11:cada08fc8a70 34 U8 stack_frame; /* Stack frame: 0=Basic, 1=Extended */
mbedAustin 11:cada08fc8a70 35 U8 reserved1;
mbedAustin 11:cada08fc8a70 36 U16 reserved2;
mbedAustin 11:cada08fc8a70 37 U32 priv_stack; /* Private stack size in bytes */
mbedAustin 11:cada08fc8a70 38 U32 tsk_stack; /* Current task Stack pointer (R13) */
mbedAustin 11:cada08fc8a70 39 U32 *stack; /* Pointer to Task Stack memory block */
mbedAustin 11:cada08fc8a70 40
mbedAustin 11:cada08fc8a70 41 /* Library dependant part */
mbedAustin 11:cada08fc8a70 42 #if defined (__CC_ARM) && !defined (__MICROLIB)
mbedAustin 11:cada08fc8a70 43 /* A memory space for arm standard library. */
mbedAustin 11:cada08fc8a70 44 U32 std_libspace[96/4];
mbedAustin 11:cada08fc8a70 45 #endif
mbedAustin 11:cada08fc8a70 46
mbedAustin 11:cada08fc8a70 47 /* Task entry point used for uVision debugger */
mbedAustin 11:cada08fc8a70 48 FUNCP ptask; /* Task entry address */
mbedAustin 11:cada08fc8a70 49 } *P_TCB;
mbedAustin 11:cada08fc8a70 50
mbedAustin 11:cada08fc8a70 51 #endif