florent ollivier / Mbed 2 deprecated Gyro

Dependencies:   mbed

Committer:
flo__
Date:
Thu Mar 31 10:44:47 2022 +0000
Revision:
1:111167e39dfa
Parent:
0:b435eadf76b4
31/03/22

Who changed what in which revision?

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