Lab Checkoff

Dependencies:   SDFileSystem TextLCD mbed-rtos mbed wave_player FATFileSystem

Committer:
doubster
Date:
Wed Nov 13 20:00:28 2013 +0000
Revision:
0:67dbd54e60d4
Lab Checkoff

Who changed what in which revision?

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