SDG+USBHost(Mouse) Sample

Dependencies:   Sound_Generator USBHost_custom

Fork of SDG_Mouse_Sample by GR-PEACH_producer_meeting

Information

Japanese version is available in lower part of this page.
このページの後半に日本語版が用意されています.

What is this?

This program is a demonstration that sounds the sound by mouse operation by using USBHost(Mouse) and Sound Generator.

Settings

Close JP3 of GR-PEACH.
/media/uploads/RyoheiHagimoto/sdg-mouse.jpg

Operation

operationeffect
Right clickSounds
Left clickReset to base tone (C)
Moves the mouse to the rightLower the sound
Moves the mouse to the leftHigher the sound
Center cursorAdjust the sensitivity.
Reset the reference value in the click.

Others

The default setting of serial communication (baud rate etc.) in mbed is shown the following link.
Please refer to the link and change the settings of your PC terminal software.
The default value of baud rate in mbed is 9600, and this application uses baud rate 9600.
https://developer.mbed.org/teams/Renesas/wiki/GR-PEACH-Getting-Started#install-the-usb-serial-communication


概要

このプログラムは、USBHost(Mouse) + Sound Generatorで、マウス操作による擬似笛デモです。

設定

GR-PEACHのJP3をショートする必要があります。
/media/uploads/RyoheiHagimoto/sdg-mouse.jpg

操作方法

操作内容
右クリック音出力開始
左クリック基準音(ド)にリセット
マウス右移動高音になります
マウス左移動低音になります
センターカーソル音高低の変化量調整(クリックで基準値にリセット)

Others

mbedのシリアル通信(ボーレート等)のデフォルト設定は以下のリンクに示しています。
リンクを参考に、お使いのPCターミナルソフトの設定を変更して下さい。
mbedでのボーレートのデフォルト値は9600で、このサンプルではボーレート9600を使います。
https://developer.mbed.org/teams/Renesas/wiki/GR-PEACH-Getting-Started#install-the-usb-serial-communication

Committer:
mbed_official
Date:
Mon Dec 16 09:00:18 2013 +0000
Revision:
19:bd46ea19486b
Parent:
13:b58a2204422f
Synchronized with git revision 170ac6562b7b2b5bb43f8ecf82b2af18b37eeb9c

Full URL: https://github.com/mbedmicro/mbed/commit/170ac6562b7b2b5bb43f8ecf82b2af18b37eeb9c/

improve USB host library and cellular modem stack

Who changed what in which revision?

UserRevisionLine numberNew contents of line
samux 8:93da8ea2708b 1 /* mbed USBHost Library
samux 8:93da8ea2708b 2 * Copyright (c) 2006-2013 ARM Limited
samux 8:93da8ea2708b 3 *
samux 8:93da8ea2708b 4 * Licensed under the Apache License, Version 2.0 (the "License");
samux 8:93da8ea2708b 5 * you may not use this file except in compliance with the License.
samux 8:93da8ea2708b 6 * You may obtain a copy of the License at
samux 8:93da8ea2708b 7 *
samux 8:93da8ea2708b 8 * http://www.apache.org/licenses/LICENSE-2.0
samux 8:93da8ea2708b 9 *
samux 8:93da8ea2708b 10 * Unless required by applicable law or agreed to in writing, software
samux 8:93da8ea2708b 11 * distributed under the License is distributed on an "AS IS" BASIS,
samux 8:93da8ea2708b 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
samux 8:93da8ea2708b 13 * See the License for the specific language governing permissions and
samux 8:93da8ea2708b 14 * limitations under the License.
samux 8:93da8ea2708b 15 */
emilmont 11:0e0baf9a3236 16
mbed_official 0:a554658735bf 17 #ifndef USB_DEBUG_H
mbed_official 0:a554658735bf 18 #define USB_DEBUG_H
mbed_official 0:a554658735bf 19
mbed_official 0:a554658735bf 20 //Debug is disabled by default
mbed_official 19:bd46ea19486b 21 #define DEBUG 3 /*INFO,ERR,WARN*/
mbed_official 0:a554658735bf 22 #define DEBUG_TRANSFER 0
mbed_official 0:a554658735bf 23 #define DEBUG_EP_STATE 0
mbed_official 0:a554658735bf 24 #define DEBUG_EVENT 0
mbed_official 0:a554658735bf 25
mbed_official 19:bd46ea19486b 26 #if (DEBUG > 3)
mbed_official 13:b58a2204422f 27 #define USB_DBG(x, ...) std::printf("[USB_DBG: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
mbed_official 0:a554658735bf 28 #else
mbed_official 0:a554658735bf 29 #define USB_DBG(x, ...)
mbed_official 0:a554658735bf 30 #endif
mbed_official 0:a554658735bf 31
mbed_official 19:bd46ea19486b 32 #if (DEBUG > 2)
mbed_official 19:bd46ea19486b 33 #define USB_INFO(x, ...) std::printf("[USB_INFO: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
mbed_official 19:bd46ea19486b 34 #else
mbed_official 19:bd46ea19486b 35 #define USB_INFO(x, ...)
mbed_official 19:bd46ea19486b 36 #endif
mbed_official 19:bd46ea19486b 37
mbed_official 19:bd46ea19486b 38 #if (DEBUG > 1)
mbed_official 19:bd46ea19486b 39 #define USB_WARN(x, ...) std::printf("[USB_WARNING: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
mbed_official 19:bd46ea19486b 40 #else
mbed_official 19:bd46ea19486b 41 #define USB_WARN(x, ...)
mbed_official 19:bd46ea19486b 42 #endif
mbed_official 19:bd46ea19486b 43
mbed_official 19:bd46ea19486b 44 #if (DEBUG > 0)
mbed_official 19:bd46ea19486b 45 #define USB_ERR(x, ...) std::printf("[USB_ERR: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
mbed_official 19:bd46ea19486b 46 #else
mbed_official 19:bd46ea19486b 47 #define USB_ERR(x, ...)
mbed_official 19:bd46ea19486b 48 #endif
mbed_official 19:bd46ea19486b 49
mbed_official 0:a554658735bf 50 #if (DEBUG_TRANSFER)
mbed_official 13:b58a2204422f 51 #define USB_DBG_TRANSFER(x, ...) std::printf("[USB_TRANSFER: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
mbed_official 0:a554658735bf 52 #else
mbed_official 0:a554658735bf 53 #define USB_DBG_TRANSFER(x, ...)
mbed_official 0:a554658735bf 54 #endif
mbed_official 0:a554658735bf 55
mbed_official 0:a554658735bf 56 #if (DEBUG_EVENT)
mbed_official 13:b58a2204422f 57 #define USB_DBG_EVENT(x, ...) std::printf("[USB_EVENT: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
mbed_official 0:a554658735bf 58 #else
mbed_official 0:a554658735bf 59 #define USB_DBG_EVENT(x, ...)
mbed_official 0:a554658735bf 60 #endif
mbed_official 0:a554658735bf 61
mbed_official 0:a554658735bf 62
mbed_official 0:a554658735bf 63 #endif
mbed_official 0:a554658735bf 64
mbed_official 0:a554658735bf 65
mbed_official 0:a554658735bf 66