01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Data Structures used in <strong>RTOS</strong> API - <strong>SC12</strong> <strong>@CHIP</strong>-<strong>RTOS</strong> <strong>V1.10</strong><br />

<strong>IPC<strong>@CHIP</strong></strong> <strong>Documentation</strong> Index<br />

Data Structures<br />

Here are the data structures used by the <strong>RTOS</strong> API. All constants and data structures are defined in the header file rtxapi.h<br />

Notes:<br />

Content :<br />

● Byte alignment is required for all data structures used within the API.<br />

● typedef_RTX_Msg<br />

● typedef_RTX_Wait_Event<br />

● typedef_RTX_Wait_Msg<br />

● typedef_TaskDefBlock<br />

● typedef_TaskList<br />

● typedef_Task_StateData<br />

● typedef_TimeDate_Structure<br />

● typedef_TimerProc_Structure<br />

RTX_Msg<br />

Comments<br />

typedef struct tag_rtx_msg{<br />

unsigned int msgID; // Unique Message Exchange ID<br />

char name[4]; // 4 characters, not null terminated<br />

int mb0; // Numbers of message envelopes which can reside<br />

int mb1; // in each of the four exchange mailboxes,<br />

int mb2; // maximum 4 envelopes.<br />

int mb3;<br />

} RTX_Msg;<br />

This structure is defined in the header file rtxapi.h.<br />

Prior to making the RTX_CREATE_MSG call, the caller must set the following members of the RTX_Msg data<br />

structure.<br />

name<br />

Here you can give the Message Exchange a unique four character name. This field is optional. If you plan to<br />

use the RTX_FIND_MSGAPI then you should provide a unique name here for all Message Exchanges.<br />

mb0 through mb3<br />

State here the number of message envelopes for each of this Message Exchange's four priority<br />

mailboxes. These counts are truncated to a maximum of 4 envelopes per mailbox inside this API. The<br />

Page 236 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!