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