Control a robot over the internet using UDP and a Wifly module (WiFi).

Dependencies:   Motor TextLCD WiflyInterface mbed-rtos mbed

Committer:
apatel336
Date:
Thu Oct 17 13:27:56 2013 +0000
Revision:
0:c0dc3a76f3d4
Initial Release

Who changed what in which revision?

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