Greg Steiert / maxim_dev

Dependents:   sensomed

Committer:
switches
Date:
Tue Nov 08 18:27:11 2016 +0000
Revision:
0:0e018d759a2a
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
switches 0:0e018d759a2a 1 /*----------------------------------------------------------------------------
switches 0:0e018d759a2a 2 * RL-ARM - RTX
switches 0:0e018d759a2a 3 *----------------------------------------------------------------------------
switches 0:0e018d759a2a 4 * Name: RT_TASK.H
switches 0:0e018d759a2a 5 * Purpose: Task functions and system start up.
switches 0:0e018d759a2a 6 * Rev.: V4.60
switches 0:0e018d759a2a 7 *----------------------------------------------------------------------------
switches 0:0e018d759a2a 8 *
switches 0:0e018d759a2a 9 * Copyright (c) 1999-2009 KEIL, 2009-2015 ARM Germany GmbH
switches 0:0e018d759a2a 10 * All rights reserved.
switches 0:0e018d759a2a 11 * Redistribution and use in source and binary forms, with or without
switches 0:0e018d759a2a 12 * modification, are permitted provided that the following conditions are met:
switches 0:0e018d759a2a 13 * - Redistributions of source code must retain the above copyright
switches 0:0e018d759a2a 14 * notice, this list of conditions and the following disclaimer.
switches 0:0e018d759a2a 15 * - Redistributions in binary form must reproduce the above copyright
switches 0:0e018d759a2a 16 * notice, this list of conditions and the following disclaimer in the
switches 0:0e018d759a2a 17 * documentation and/or other materials provided with the distribution.
switches 0:0e018d759a2a 18 * - Neither the name of ARM nor the names of its contributors may be used
switches 0:0e018d759a2a 19 * to endorse or promote products derived from this software without
switches 0:0e018d759a2a 20 * specific prior written permission.
switches 0:0e018d759a2a 21 *
switches 0:0e018d759a2a 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
switches 0:0e018d759a2a 23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
switches 0:0e018d759a2a 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
switches 0:0e018d759a2a 25 * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
switches 0:0e018d759a2a 26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
switches 0:0e018d759a2a 27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
switches 0:0e018d759a2a 28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
switches 0:0e018d759a2a 29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
switches 0:0e018d759a2a 30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
switches 0:0e018d759a2a 31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
switches 0:0e018d759a2a 32 * POSSIBILITY OF SUCH DAMAGE.
switches 0:0e018d759a2a 33 *---------------------------------------------------------------------------*/
switches 0:0e018d759a2a 34
switches 0:0e018d759a2a 35 /* Definitions */
switches 0:0e018d759a2a 36 #define __CMSIS_RTOS 1
switches 0:0e018d759a2a 37
switches 0:0e018d759a2a 38 /* Values for 'state' */
switches 0:0e018d759a2a 39 #define INACTIVE 0
switches 0:0e018d759a2a 40 #define READY 1
switches 0:0e018d759a2a 41 #define RUNNING 2
switches 0:0e018d759a2a 42 #define WAIT_DLY 3
switches 0:0e018d759a2a 43 #define WAIT_ITV 4
switches 0:0e018d759a2a 44 #define WAIT_OR 5
switches 0:0e018d759a2a 45 #define WAIT_AND 6
switches 0:0e018d759a2a 46 #define WAIT_SEM 7
switches 0:0e018d759a2a 47 #define WAIT_MBX 8
switches 0:0e018d759a2a 48 #define WAIT_MUT 9
switches 0:0e018d759a2a 49
switches 0:0e018d759a2a 50 /* Return codes */
switches 0:0e018d759a2a 51 #define OS_R_TMO 0x01
switches 0:0e018d759a2a 52 #define OS_R_EVT 0x02
switches 0:0e018d759a2a 53 #define OS_R_SEM 0x03
switches 0:0e018d759a2a 54 #define OS_R_MBX 0x04
switches 0:0e018d759a2a 55 #define OS_R_MUT 0x05
switches 0:0e018d759a2a 56
switches 0:0e018d759a2a 57 #define OS_R_OK 0x00
switches 0:0e018d759a2a 58 #define OS_R_NOK 0xff
switches 0:0e018d759a2a 59
switches 0:0e018d759a2a 60 /* Variables */
switches 0:0e018d759a2a 61 extern struct OS_TSK os_tsk;
switches 0:0e018d759a2a 62 extern struct OS_TCB os_idle_TCB;
switches 0:0e018d759a2a 63
switches 0:0e018d759a2a 64 /* Functions */
switches 0:0e018d759a2a 65 extern void rt_switch_req (P_TCB p_new);
switches 0:0e018d759a2a 66 extern void rt_dispatch (P_TCB next_TCB);
switches 0:0e018d759a2a 67 extern void rt_block (U16 timeout, U8 block_state);
switches 0:0e018d759a2a 68 extern void rt_tsk_pass (void);
switches 0:0e018d759a2a 69 extern OS_TID rt_tsk_self (void);
switches 0:0e018d759a2a 70 extern OS_RESULT rt_tsk_prio (OS_TID task_id, U8 new_prio);
switches 0:0e018d759a2a 71 extern OS_RESULT rt_tsk_delete (OS_TID task_id);
switches 0:0e018d759a2a 72 extern void rt_sys_init (void);
switches 0:0e018d759a2a 73 extern void rt_sys_start (void);