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

Revision:
30:ff42cc7a0d55
Parent:
29:181839dc8cb0
Child:
31:f6d9dbbc1481
--- a/USBHost/TARGET_RENESAS/TARGET_RZ_A1H/src/host/usb0_host_global.c	Tue Mar 31 07:44:06 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*******************************************************************************
-* DISCLAIMER
-* This software is supplied by Renesas Electronics Corporation and is only
-* intended for use with Renesas products. No other uses are authorized. This
-* software is owned by Renesas Electronics Corporation and is protected under
-* all applicable laws, including copyright laws.
-* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
-* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
-* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
-* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
-* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
-* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
-* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
-* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
-* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-* Renesas reserves the right, without notice, to make changes to this software
-* and to discontinue the availability of this software. By using this software,
-* you agree to the additional terms and conditions found by accessing the
-* following link:
-* http://www.renesas.com/disclaimer
-* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
-*******************************************************************************/
-/*******************************************************************************
-* File Name    : usb0_host_global.c
-* $Rev: 1116 $
-* $Date:: 2014-07-09 16:29:19 +0900#$
-* Device(s)    : RZ/A1H
-* Tool-Chain   :
-* OS           : None
-* H/W Platform :
-* Description  : RZ/A1H R7S72100 USB Sample Program
-* Operation    :
-* Limitations  :
-*******************************************************************************/
-
-
-/*******************************************************************************
-Includes   <System Includes> , "Project Includes"
-*******************************************************************************/
-#include "usb0_host.h"
-
-
-/*******************************************************************************
-Typedef definitions
-*******************************************************************************/
-
-
-/*******************************************************************************
-Macro definitions
-*******************************************************************************/
-
-
-/*******************************************************************************
-Imported global variables and functions (from other files)
-*******************************************************************************/
-
-
-/*******************************************************************************
-Exported global variables and functions (to be accessed by other files)
-*******************************************************************************/
-const uint16_t g_usb0_host_bit_set[16] =
-{
-    0x0001, 0x0002, 0x0004, 0x0008,
-    0x0010, 0x0020, 0x0040, 0x0080,
-    0x0100, 0x0200, 0x0400, 0x0800,
-    0x1000, 0x2000, 0x4000, 0x8000
-};
-
-uint32_t  g_usb0_host_data_count[USB_HOST_MAX_PIPE_NO + 1];
-uint8_t * g_usb0_host_data_pointer[USB_HOST_MAX_PIPE_NO + 1];
-
-uint16_t  g_usb0_host_PipeIgnore[USB_HOST_MAX_PIPE_NO + 1];
-uint16_t  g_usb0_host_PipeTbl[USB_HOST_MAX_PIPE_NO + 1];
-uint16_t  g_usb0_host_pipe_status[USB_HOST_MAX_PIPE_NO + 1];
-uint32_t  g_usb0_host_PipeDataSize[USB_HOST_MAX_PIPE_NO + 1];
-
-USB_HOST_DMA_t g_usb0_host_DmaInfo[2];
-
-uint16_t  g_usb0_host_DmaPipe[2];
-uint16_t  g_usb0_host_DmaBval[2];
-uint16_t  g_usb0_host_DmaStatus[2];
-
-uint16_t  g_usb0_host_driver_state;
-uint16_t  g_usb0_host_ConfigNum;
-uint16_t  g_usb0_host_CmdStage;
-uint16_t  g_usb0_host_bchg_flag;
-uint16_t  g_usb0_host_detach_flag;
-uint16_t  g_usb0_host_attach_flag;
-
-uint16_t  g_usb0_host_UsbAddress;
-uint16_t  g_usb0_host_setUsbAddress;
-uint16_t  g_usb0_host_default_max_packet[USB_HOST_MAX_DEVICE + 1];
-uint16_t  g_usb0_host_UsbDeviceSpeed;
-uint16_t  g_usb0_host_SupportUsbDeviceSpeed;
-
-uint16_t  g_usb0_host_SavReq;
-uint16_t  g_usb0_host_SavVal;
-uint16_t  g_usb0_host_SavIndx;
-uint16_t  g_usb0_host_SavLen;
-
-uint16_t  g_usb0_host_pipecfg[USB_HOST_MAX_PIPE_NO + 1];
-uint16_t  g_usb0_host_pipebuf[USB_HOST_MAX_PIPE_NO + 1];
-uint16_t  g_usb0_host_pipemaxp[USB_HOST_MAX_PIPE_NO + 1];
-uint16_t  g_usb0_host_pipeperi[USB_HOST_MAX_PIPE_NO + 1];
-
-
-/*******************************************************************************
-Private global variables and functions
-*******************************************************************************/
-
-
-/*******************************************************************************
-* Function Name: usb0_host_init_pipe_status
-* Description  : Initialize pipe status.
-* Arguments    : none
-* Return Value : none
-*******************************************************************************/
-void usb0_host_init_pipe_status (void)
-{
-    uint16_t loop;
-
-    g_usb0_host_ConfigNum = 0;
-
-    for (loop = 0; loop < (USB_HOST_MAX_PIPE_NO + 1); ++loop)
-    {
-        g_usb0_host_pipe_status[loop]   = USB_HOST_PIPE_IDLE;
-        g_usb0_host_PipeDataSize[loop]  = 0;
-
-        /* pipe configuration in usb0_host_resetEP() */
-        g_usb0_host_pipecfg[loop]  = 0;
-        g_usb0_host_pipebuf[loop]  = 0;
-        g_usb0_host_pipemaxp[loop] = 0;
-        g_usb0_host_pipeperi[loop] = 0;
-    }
-}
-
-/* End of File */