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/inc/usb0_host_api.h	Tue Mar 31 07:44:06 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +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_api.h
-* $Rev: 1116 $
-* $Date:: 2014-07-09 16:29:19 +0900#$
-* Description  : RZ/A1H R7S72100 USB Sample Program
-*******************************************************************************/
-#ifndef USB0_HOST_API_H
-#define USB0_HOST_API_H
-
-
-/*******************************************************************************
-Typedef definitions
-*******************************************************************************/
-
-
-/*******************************************************************************
-Macro definitions
-*******************************************************************************/
-
-
-/*******************************************************************************
-Variable Externs
-*******************************************************************************/
-
-
-/*******************************************************************************
-Functions Prototypes
-*******************************************************************************/
-void        usb0_host_interrupt(uint32_t int_sense);
-void        usb0_host_dma_interrupt_d0fifo(uint32_t int_sense);
-void        usb0_host_dma_interrupt_d1fifo(uint32_t int_sense);
-
-uint16_t    usb0_api_host_init(uint8_t int_level, uint16_t mode, uint16_t clockmode);
-int32_t     usb0_api_host_enumeration(uint16_t devadr);
-int32_t     usb0_api_host_detach(void);
-int32_t     usb0_api_host_data_in(uint16_t devadr, uint16_t Pipe, uint32_t Size, uint8_t *data_buf);
-int32_t     usb0_api_host_data_out(uint16_t devadr, uint16_t Pipe, uint32_t Size, uint8_t *data_buf);
-int32_t     usb0_api_host_control_transfer(uint16_t devadr, uint16_t Req, uint16_t Val, uint16_t Indx, uint16_t Len, uint8_t *Buf);
-int32_t     usb0_api_host_set_endpoint(uint16_t devadr, USB_HOST_CFG_PIPETBL_t *user_table, uint8_t *configdescriptor);
-int32_t     usb0_api_host_clear_endpoint(USB_HOST_CFG_PIPETBL_t *user_table);
-int32_t     usb0_api_host_clear_endpoint_pipe(uint16_t pipe_sel, USB_HOST_CFG_PIPETBL_t *user_table);
-uint16_t    usb0_api_host_SetEndpointTable(uint16_t devadr, USB_HOST_CFG_PIPETBL_t *user_table, uint8_t* Table);
-int32_t     usb0_api_host_data_count(uint16_t pipe, uint32_t *data_count);
-
-int32_t     usb0_api_host_GetDeviceDescriptor(uint16_t devadr, uint16_t size, uint8_t *buf);
-int32_t     usb0_api_host_GetConfigDescriptor(uint16_t devadr, uint16_t size, uint8_t *buf);
-int32_t     usb0_api_host_SetConfig(uint16_t devadr, uint16_t confignum);
-int32_t     usb0_api_host_SetInterface(uint16_t devadr, uint16_t interface_alt, uint16_t interface_index);
-int32_t     usb0_api_host_ClearStall(uint16_t devadr, uint16_t ep_dir);
-uint16_t    usb0_api_host_GetUsbDeviceState(void);
-
-void        usb0_api_host_elt_4_4(void);
-void        usb0_api_host_elt_4_5(void);
-void        usb0_api_host_elt_4_6(void);
-void        usb0_api_host_elt_4_7(void);
-void        usb0_api_host_elt_4_8(void);
-void        usb0_api_host_elt_4_9(void);
-void        usb0_api_host_elt_get_desc(void);
-
-void        usb0_host_EL_ModeInit(void);
-void        usb0_host_EL_SetUACT(void);
-void        usb0_host_EL_ClearUACT(void);
-void        usb0_host_EL_SetTESTMODE(uint16_t mode);
-void        usb0_host_EL_ClearNRDYSTS(uint16_t pipe);
-uint16_t    usb0_host_EL_GetINTSTS1(void);
-void        usb0_host_EL_UsbBusReset(void);
-void        usb0_host_EL_UsbAttach(void);
-void        usb0_host_EL_SetupStage(uint16_t Req, uint16_t Val, uint16_t Indx, uint16_t Len);
-void        usb0_host_EL_StatusStage(void);
-void        usb0_host_EL_CtrlReadStart(uint32_t Bsize, uint8_t *Table);
-int32_t     usb0_host_EL_UsbSuspend(void);
-int32_t     usb0_host_EL_UsbResume(void);
-
-#if 0   /* prototype in devdrv_usb_host_api.h */
-uint16_t    Userdef_USB_usb0_host_d0fifo_dmaintid(void);
-uint16_t    Userdef_USB_usb0_host_d1fifo_dmaintid(void);
-void        Userdef_USB_usb0_host_attach(void);
-void        Userdef_USB_usb0_host_detach(void);
-void        Userdef_USB_usb0_host_delay_1ms(void);
-void        Userdef_USB_usb0_host_delay_xms(uint32_t msec);
-void        Userdef_USB_usb0_host_delay_10us(uint32_t usec);
-void        Userdef_USB_usb0_host_delay_500ns(void);
-void        Userdef_USB_usb0_host_start_dma(USB_HOST_DMA_t *dma, uint16_t dfacc);
-uint32_t    Userdef_USB_usb0_host_stop_dma0(void);
-uint32_t    Userdef_USB_usb0_host_stop_dma1(void);
-#endif
-
-#endif /* USB0_HOST_API_H */
-
-/* End of File */