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

Files at this revision

API Documentation at this revision

Comitter:
samux
Date:
Wed Mar 06 17:44:00 2013 +0000
Parent:
1:0a457e34fa9e
Child:
3:0f5c32575eb8
Commit message:
update doxygen

Changed in this revision

USBHost/USBDeviceConnected.h Show annotated file Show diff for this revision Revisions of this file
USBHost/USBHALHost.h Show annotated file Show diff for this revision Revisions of this file
USBHostHID/USBHostKeyboard.h Show annotated file Show diff for this revision Revisions of this file
USBHostHID/USBHostMouse.h Show annotated file Show diff for this revision Revisions of this file
USBHostSerial/USBHostSerial.h Show annotated file Show diff for this revision Revisions of this file
--- 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) {
--- a/USBHost/USBHALHost.h	Wed Mar 06 17:10:32 2013 +0000
+++ b/USBHost/USBHALHost.h	Wed Mar 06 17:44:00 2013 +0000
@@ -143,7 +143,7 @@
     /**
     * Release a previous memory section reserved for an TD
     *
-    * @param ed address of the TD
+    * @param td address of the TD
     */
     void freeTD(volatile uint8_t * td);
 
--- a/USBHostHID/USBHostKeyboard.h	Wed Mar 06 17:10:32 2013 +0000
+++ b/USBHostHID/USBHostKeyboard.h	Wed Mar 06 17:44:00 2013 +0000
@@ -53,7 +53,7 @@
     /**
      * Attach a callback called when a keyboard event is received
      *
-     * @param fptr function pointer
+     * @param ptr function pointer
      */
     inline void attach(void (*ptr)(uint8_t key)) {
         if (ptr != NULL) {
@@ -64,7 +64,7 @@
     /**
      * Attach a callback called when a keyboard event is received
      *
-     * @param fptr function pointer
+     * @param ptr function pointer
      */
     inline void attach(void (*ptr)(uint8_t keyCode, uint8_t modifier)) {
         if (ptr != NULL) {
--- a/USBHostHID/USBHostMouse.h	Wed Mar 06 17:10:32 2013 +0000
+++ b/USBHostHID/USBHostMouse.h	Wed Mar 06 17:44:00 2013 +0000
@@ -53,7 +53,7 @@
     /**
      * Attach a callback called when a mouse event is received
      *
-     * @param fptr function pointer
+     * @param ptr function pointer
      */
     inline void attach(void (*ptr)(uint8_t buttons, int8_t x, int8_t y, int8_t z)) {
         if (ptr != NULL) {
--- a/USBHostSerial/USBHostSerial.h	Wed Mar 06 17:10:32 2013 +0000
+++ b/USBHostSerial/USBHostSerial.h	Wed Mar 06 17:44:00 2013 +0000
@@ -68,6 +68,7 @@
      *
      *  @param tptr pointer to the object to call the member function on
      *  @param mptr pointer to the member function to be called
+     *  @param irq irq type
      */
     template<typename T>
     inline void attach(T* tptr, void (T::*mptr)(void), IrqType irq = RxIrq) {
@@ -83,7 +84,7 @@
     /**
      * Attach a callback called when a packet is received
      *
-     * @param fptr function pointer
+     * @param ptr function pointer
      */
     inline void attach(void (*fn)(void), IrqType irq = RxIrq) {
         if (fn != NULL) {