SDG+USBHost(Mouse) Sample
Dependencies: Sound_Generator USBHost_custom
Fork of SDG_Mouse_Sample by
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.
Operation
| operation | effect |
|---|---|
| Right click | Sounds |
| Left click | Reset to base tone (C) |
| Moves the mouse to the right | Lower the sound |
| Moves the mouse to the left | Higher the sound |
| Center cursor | Adjust 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をショートする必要があります。
操作方法
| 操作 | 内容 |
|---|---|
| 右クリック | 音出力開始 |
| 左クリック | 基準音(ド)にリセット |
| マウス右移動 | 高音になります |
| マウス左移動 | 低音になります |
| センターカーソル | 音高低の変化量調整(クリックで基準値にリセット) |
Others
mbedのシリアル通信(ボーレート等)のデフォルト設定は以下のリンクに示しています。
リンクを参考に、お使いのPCターミナルソフトの設定を変更して下さい。
mbedでのボーレートのデフォルト値は9600で、このサンプルではボーレート9600を使います。
https://developer.mbed.org/teams/Renesas/wiki/GR-PEACH-Getting-Started#install-the-usb-serial-communication
Diff: USBHost/USBDeviceConnected.h
- Revision:
- 2:5e8fdc541b98
- Parent:
- 0:a554658735bf
- Child:
- 4:b320d68e98e7
--- a/USBHost/USBDeviceConnected.h Wed Mar 06 17:10:32 2013 +0000
+++ b/USBHost/USBDeviceConnected.h Wed Mar 06 17:44:00 2013 +0000
@@ -57,7 +57,7 @@
*
* @param intf_nb the interface on which to lookup the USBEndpoint
* @param type type of the USBEndpoint looked for
- * @param direction of the USBEndpoint looked for
+ * @param dir direction of the USBEndpoint looked for
* @param index the index of the USBEndpoint whitin the interface
* @returns pointer on the USBEndpoint if found, NULL otherwise
*/
@@ -77,7 +77,7 @@
* @param intf_nb interface number
* @param intf_class interface class
* @param intf_subclass interface subclass
- * @param intf_ptotocol interface protocol
+ * @param intf_protocol interface protocol
* @returns true if successful, false otherwise
*/
bool addInterface(uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol);
@@ -102,6 +102,7 @@
/**
* Attach a member function to call when a the device has been disconnected
*
+ * @param intf_nb interface number
* @param tptr pointer to the object to call the member function on
* @param mptr pointer to the member function to be called
*/
@@ -115,7 +116,8 @@
/**
* Attach a callback called when the device has been disconnected
*
- * @param fptr function pointer
+ * @param intf_nb interface number
+ * @param fn function pointer
*/
inline void onDisconnect(uint8_t intf_nb, void (*fn)(void)) {
if (fn != NULL) {
