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