Programme gyro_accelero avec acquisition accelero + calcul téta

Dependents:   Gyro_Accelerometre2

Committer:
SandrineO
Date:
Tue Feb 20 15:58:26 2018 +0000
Revision:
0:07281ea3b26b
temps r?el

Who changed what in which revision?

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