ソースの整理中ですが、利用はできます。

Dependencies:   EthernetInterface HttpServer TextLCD mbed-rpc mbed-rtos mbed Socket lwip-eth lwip-sys lwip

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers rt_Task.h Source File

rt_Task.h

00001 /*----------------------------------------------------------------------------
00002  *      RL-ARM - RTX
00003  *----------------------------------------------------------------------------
00004  *      Name:    RT_TASK.H
00005  *      Purpose: Task functions and system start up.
00006  *      Rev.:    V4.60
00007  *----------------------------------------------------------------------------
00008  *
00009  * Copyright (c) 1999-2009 KEIL, 2009-2012 ARM Germany GmbH
00010  * All rights reserved.
00011  * Redistribution and use in source and binary forms, with or without
00012  * modification, are permitted provided that the following conditions are met:
00013  *  - Redistributions of source code must retain the above copyright
00014  *    notice, this list of conditions and the following disclaimer.
00015  *  - Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in the
00017  *    documentation and/or other materials provided with the distribution.
00018  *  - Neither the name of ARM  nor the names of its contributors may be used 
00019  *    to endorse or promote products derived from this software without 
00020  *    specific prior written permission.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
00023  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
00024  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00025  * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
00026  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00027  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
00028  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
00029  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
00030  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
00031  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00032  * POSSIBILITY OF SUCH DAMAGE.
00033  *---------------------------------------------------------------------------*/
00034 
00035 /* Definitions */
00036 #define __CMSIS_RTOS    1
00037 
00038 /* Values for 'state'   */
00039 #define INACTIVE        0
00040 #define READY           1
00041 #define RUNNING         2
00042 #define WAIT_DLY        3
00043 #define WAIT_ITV        4
00044 #define WAIT_OR         5
00045 #define WAIT_AND        6
00046 #define WAIT_SEM        7
00047 #define WAIT_MBX        8
00048 #define WAIT_MUT        9
00049 
00050 /* Return codes */
00051 #define OS_R_TMO        0x01
00052 #define OS_R_EVT        0x02
00053 #define OS_R_SEM        0x03
00054 #define OS_R_MBX        0x04
00055 #define OS_R_MUT        0x05
00056 
00057 #define OS_R_OK         0x00
00058 #define OS_R_NOK        0xff
00059 
00060 /* Variables */
00061 extern struct OS_TSK os_tsk;
00062 extern struct OS_TCB os_idle_TCB;
00063 
00064 /* Functions */
00065 extern void      rt_switch_req (P_TCB p_new);
00066 extern void      rt_dispatch   (P_TCB next_TCB);
00067 extern void      rt_block      (U16 timeout, U8 block_state);
00068 extern void      rt_tsk_pass   (void);
00069 extern OS_TID    rt_tsk_self   (void);
00070 extern OS_RESULT rt_tsk_prio   (OS_TID task_id, U8 new_prio);
00071 extern OS_RESULT rt_tsk_delete (OS_TID task_id);
00072 extern void      rt_sys_init   (void);
00073 extern void      rt_sys_start  (void);