![](/media/cache/profiles/5f14615696649541a025d3d0f8e0447f.jpg.50x50_q85.jpg)
うおーるぼっとをWiiリモコンでコントロールする新しいプログラムです。 以前のものより、Wiiリモコンが早く繋がる様になりました。 It is a program which controls A with the Wii remote. ※ A Bluetooth dongle and a Wii remote control are needed.
Dependencies: USBHost mbed FATFileSystem mbed-rtos
USBHost/mbed-rtos/rtx/rt_Task.h@0:fccb789424fc, 2013-06-10 (annotated)
- Committer:
- jksoft
- Date:
- Mon Jun 10 16:01:50 2013 +0000
- Revision:
- 0:fccb789424fc
1.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 0:fccb789424fc | 1 | /*---------------------------------------------------------------------------- |
jksoft | 0:fccb789424fc | 2 | * RL-ARM - RTX |
jksoft | 0:fccb789424fc | 3 | *---------------------------------------------------------------------------- |
jksoft | 0:fccb789424fc | 4 | * Name: RT_TASK.H |
jksoft | 0:fccb789424fc | 5 | * Purpose: Task functions and system start up. |
jksoft | 0:fccb789424fc | 6 | * Rev.: V4.60 |
jksoft | 0:fccb789424fc | 7 | *---------------------------------------------------------------------------- |
jksoft | 0:fccb789424fc | 8 | * |
jksoft | 0:fccb789424fc | 9 | * Copyright (c) 1999-2009 KEIL, 2009-2012 ARM Germany GmbH |
jksoft | 0:fccb789424fc | 10 | * All rights reserved. |
jksoft | 0:fccb789424fc | 11 | * Redistribution and use in source and binary forms, with or without |
jksoft | 0:fccb789424fc | 12 | * modification, are permitted provided that the following conditions are met: |
jksoft | 0:fccb789424fc | 13 | * - Redistributions of source code must retain the above copyright |
jksoft | 0:fccb789424fc | 14 | * notice, this list of conditions and the following disclaimer. |
jksoft | 0:fccb789424fc | 15 | * - Redistributions in binary form must reproduce the above copyright |
jksoft | 0:fccb789424fc | 16 | * notice, this list of conditions and the following disclaimer in the |
jksoft | 0:fccb789424fc | 17 | * documentation and/or other materials provided with the distribution. |
jksoft | 0:fccb789424fc | 18 | * - Neither the name of ARM nor the names of its contributors may be used |
jksoft | 0:fccb789424fc | 19 | * to endorse or promote products derived from this software without |
jksoft | 0:fccb789424fc | 20 | * specific prior written permission. |
jksoft | 0:fccb789424fc | 21 | * |
jksoft | 0:fccb789424fc | 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
jksoft | 0:fccb789424fc | 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
jksoft | 0:fccb789424fc | 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
jksoft | 0:fccb789424fc | 25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE |
jksoft | 0:fccb789424fc | 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
jksoft | 0:fccb789424fc | 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
jksoft | 0:fccb789424fc | 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
jksoft | 0:fccb789424fc | 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
jksoft | 0:fccb789424fc | 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
jksoft | 0:fccb789424fc | 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
jksoft | 0:fccb789424fc | 32 | * POSSIBILITY OF SUCH DAMAGE. |
jksoft | 0:fccb789424fc | 33 | *---------------------------------------------------------------------------*/ |
jksoft | 0:fccb789424fc | 34 | |
jksoft | 0:fccb789424fc | 35 | /* Definitions */ |
jksoft | 0:fccb789424fc | 36 | #define __CMSIS_RTOS 1 |
jksoft | 0:fccb789424fc | 37 | |
jksoft | 0:fccb789424fc | 38 | /* Values for 'state' */ |
jksoft | 0:fccb789424fc | 39 | #define INACTIVE 0 |
jksoft | 0:fccb789424fc | 40 | #define READY 1 |
jksoft | 0:fccb789424fc | 41 | #define RUNNING 2 |
jksoft | 0:fccb789424fc | 42 | #define WAIT_DLY 3 |
jksoft | 0:fccb789424fc | 43 | #define WAIT_ITV 4 |
jksoft | 0:fccb789424fc | 44 | #define WAIT_OR 5 |
jksoft | 0:fccb789424fc | 45 | #define WAIT_AND 6 |
jksoft | 0:fccb789424fc | 46 | #define WAIT_SEM 7 |
jksoft | 0:fccb789424fc | 47 | #define WAIT_MBX 8 |
jksoft | 0:fccb789424fc | 48 | #define WAIT_MUT 9 |
jksoft | 0:fccb789424fc | 49 | |
jksoft | 0:fccb789424fc | 50 | /* Return codes */ |
jksoft | 0:fccb789424fc | 51 | #define OS_R_TMO 0x01 |
jksoft | 0:fccb789424fc | 52 | #define OS_R_EVT 0x02 |
jksoft | 0:fccb789424fc | 53 | #define OS_R_SEM 0x03 |
jksoft | 0:fccb789424fc | 54 | #define OS_R_MBX 0x04 |
jksoft | 0:fccb789424fc | 55 | #define OS_R_MUT 0x05 |
jksoft | 0:fccb789424fc | 56 | |
jksoft | 0:fccb789424fc | 57 | #define OS_R_OK 0x00 |
jksoft | 0:fccb789424fc | 58 | #define OS_R_NOK 0xff |
jksoft | 0:fccb789424fc | 59 | |
jksoft | 0:fccb789424fc | 60 | /* Variables */ |
jksoft | 0:fccb789424fc | 61 | extern struct OS_TSK os_tsk; |
jksoft | 0:fccb789424fc | 62 | extern struct OS_TCB os_idle_TCB; |
jksoft | 0:fccb789424fc | 63 | |
jksoft | 0:fccb789424fc | 64 | /* Functions */ |
jksoft | 0:fccb789424fc | 65 | extern void rt_switch_req (P_TCB p_new); |
jksoft | 0:fccb789424fc | 66 | extern void rt_dispatch (P_TCB next_TCB); |
jksoft | 0:fccb789424fc | 67 | extern void rt_block (U16 timeout, U8 block_state); |
jksoft | 0:fccb789424fc | 68 | extern void rt_tsk_pass (void); |
jksoft | 0:fccb789424fc | 69 | extern OS_TID rt_tsk_self (void); |
jksoft | 0:fccb789424fc | 70 | extern OS_RESULT rt_tsk_prio (OS_TID task_id, U8 new_prio); |
jksoft | 0:fccb789424fc | 71 | extern OS_RESULT rt_tsk_delete (OS_TID task_id); |
jksoft | 0:fccb789424fc | 72 | extern void rt_sys_init (void); |
jksoft | 0:fccb789424fc | 73 | extern void rt_sys_start (void); |