The code from https://github.com/vpcola/Nucleo

Committer:
sinrab
Date:
Wed Oct 08 11:00:24 2014 +0000
Revision:
0:5464d5e415e5
The code from https://github.com/vpcola/Nucleo

Who changed what in which revision?

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