Renesas M3T-MR100 Network Card User Manual


 
- 280 -
12.2 Common Constants and Packet Format of Structure
----Common formats----
TRUE 1 /* True */
FALSE 0 /* False */
----Formats related to task management----
TSK_SELF 0 /* Specifies the issuing task itself */
TPRI_RUN 0 /* Specifies priority of task being executed then */
typedef struct t_rtsk {
STAT tskstat; /* Task status */
PRI tskpri; /* Current priority of task */
PRI tskbpri; /* Base priority of task */
STAT tskwait; /* Reason for which task is kept waiting */
ID wid; /* Object ID for which task is kept waiting */
TMO tskatr; /* Remaining time before task times out */
UINT actcnt; /* Number of activation requests */
UINT wupcnt; /* Number of wakeup requests */
UINT suscnt; /* Number of suspension requests */
} T_RTSK;
typedef struct t_rtst {
STAT tskstat; /* Task status */
STAT tskwait; /* Reason for which task is kept waiting */
} T_RTST;
----Formats related to semaphore----
typedef struct t_rsem {
ID wtskid; /* ID number of task at the top of waiting queue */
INT semcnt; /* Current semaphore count value */
} T_RSEM;
----Formats related to eventflag----
wfmod:
TWF_ANDW H’0000 /* AND wait */
TWF_ORW H’0002 /* OR wait */
typedef struct t_rflg {
ID wtskid; /* ID number of task at the top of waiting queue */
UINT flgptn; /* Current bit pattern of eventflag */
} T_RFLG;
----Formats related to data queue and short data queue----
typedef struct t_rdtq {
ID stskid; /* ID number of task at the top of transmission waiting queue */
ID rtskid; /* ID number of task at the top of reception waiting queue */
UINT sdtqcnt; /* Number of data bytes contained in data queue */
} T_RDTQ;
----Formats related to mailbox----
typedef struct t_msg {
VP msghead; /* Message header */
} T_MSG;
typedef struct t_msg_pri {
T_MSG msgque; /* Message header */
PRI msgpri; /* Message priority */
} T_MSG_PRI;
typedef struct t_mbx {
ID wtskid; /* ID number of task at the top of waiting queue */
T_MSG *pk_msg; /* Next message to be received */
} T_RMBX;
----Formats related to fixed-size memory pool----
typedef struct t_rmpf {
ID wtskid; /* ID number of task at the top of memory acquisition waiting queue
*/
UINT frbcnt; /* Number of memory blocks */
} T_RMPF;