Dieter Graef / Mbed 2 deprecated DISCO-F746NG_USB_Host

Dependencies:   USBHost_DISCO-F746NG mbed

Committer:
DieterGraef
Date:
Fri Jun 17 09:01:37 2016 +0000
Revision:
2:ca1b5b911ba8
Parent:
0:af2040964256
Demo program now uses USB Stick on high speed and HID on fast speed interface. Move your mouse!

Who changed what in which revision?

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