]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/USBHost/USBHost/TARGET_RENESAS/TARGET_RZ_A1H/usb0/src/host/usb0_host_global.c
remove experimental return, cleanup slash_question key
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / USBHost / USBHost / TARGET_RENESAS / TARGET_RZ_A1H / usb0 / src / host / usb0_host_global.c
1 /*******************************************************************************
2 * DISCLAIMER
3 * This software is supplied by Renesas Electronics Corporation and is only
4 * intended for use with Renesas products. No other uses are authorized. This
5 * software is owned by Renesas Electronics Corporation and is protected under
6 * all applicable laws, including copyright laws.
7 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
8 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
9 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
10 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
11 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
12 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
13 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
14 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
15 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
16 * Renesas reserves the right, without notice, to make changes to this software
17 * and to discontinue the availability of this software. By using this software,
18 * you agree to the additional terms and conditions found by accessing the
19 * following link:
20 * http://www.renesas.com/disclaimer
21 * Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
22 *******************************************************************************/
23 /*******************************************************************************
24 * File Name : usb0_host_global.c
25 * $Rev: 1116 $
26 * $Date:: 2014-07-09 16:29:19 +0900#$
27 * Device(s) : RZ/A1H
28 * Tool-Chain :
29 * OS : None
30 * H/W Platform :
31 * Description : RZ/A1H R7S72100 USB Sample Program
32 * Operation :
33 * Limitations :
34 *******************************************************************************/
35
36
37 /*******************************************************************************
38 Includes <System Includes> , "Project Includes"
39 *******************************************************************************/
40 #include "usb0_host.h"
41
42
43 /*******************************************************************************
44 Typedef definitions
45 *******************************************************************************/
46
47
48 /*******************************************************************************
49 Macro definitions
50 *******************************************************************************/
51
52
53 /*******************************************************************************
54 Imported global variables and functions (from other files)
55 *******************************************************************************/
56
57
58 /*******************************************************************************
59 Exported global variables and functions (to be accessed by other files)
60 *******************************************************************************/
61 const uint16_t g_usb0_host_bit_set[16] =
62 {
63 0x0001, 0x0002, 0x0004, 0x0008,
64 0x0010, 0x0020, 0x0040, 0x0080,
65 0x0100, 0x0200, 0x0400, 0x0800,
66 0x1000, 0x2000, 0x4000, 0x8000
67 };
68
69 uint32_t g_usb0_host_data_count[USB_HOST_MAX_PIPE_NO + 1];
70 uint8_t * g_usb0_host_data_pointer[USB_HOST_MAX_PIPE_NO + 1];
71
72 uint16_t g_usb0_host_PipeIgnore[USB_HOST_MAX_PIPE_NO + 1];
73 uint16_t g_usb0_host_PipeTbl[USB_HOST_MAX_PIPE_NO + 1];
74 uint16_t g_usb0_host_pipe_status[USB_HOST_MAX_PIPE_NO + 1];
75 uint32_t g_usb0_host_PipeDataSize[USB_HOST_MAX_PIPE_NO + 1];
76
77 USB_HOST_DMA_t g_usb0_host_DmaInfo[2];
78
79 uint16_t g_usb0_host_DmaPipe[2];
80 uint16_t g_usb0_host_DmaBval[2];
81 uint16_t g_usb0_host_DmaStatus[2];
82
83 uint16_t g_usb0_host_driver_state;
84 uint16_t g_usb0_host_ConfigNum;
85 uint16_t g_usb0_host_CmdStage;
86 uint16_t g_usb0_host_bchg_flag;
87 uint16_t g_usb0_host_detach_flag;
88 uint16_t g_usb0_host_attach_flag;
89
90 uint16_t g_usb0_host_UsbAddress;
91 uint16_t g_usb0_host_setUsbAddress;
92 uint16_t g_usb0_host_default_max_packet[USB_HOST_MAX_DEVICE + 1];
93 uint16_t g_usb0_host_UsbDeviceSpeed;
94 uint16_t g_usb0_host_SupportUsbDeviceSpeed;
95
96 uint16_t g_usb0_host_SavReq;
97 uint16_t g_usb0_host_SavVal;
98 uint16_t g_usb0_host_SavIndx;
99 uint16_t g_usb0_host_SavLen;
100
101 uint16_t g_usb0_host_pipecfg[USB_HOST_MAX_PIPE_NO + 1];
102 uint16_t g_usb0_host_pipebuf[USB_HOST_MAX_PIPE_NO + 1];
103 uint16_t g_usb0_host_pipemaxp[USB_HOST_MAX_PIPE_NO + 1];
104 uint16_t g_usb0_host_pipeperi[USB_HOST_MAX_PIPE_NO + 1];
105
106
107 /*******************************************************************************
108 Private global variables and functions
109 *******************************************************************************/
110
111
112 /*******************************************************************************
113 * Function Name: usb0_host_init_pipe_status
114 * Description : Initialize pipe status.
115 * Arguments : none
116 * Return Value : none
117 *******************************************************************************/
118 void usb0_host_init_pipe_status (void)
119 {
120 uint16_t loop;
121
122 g_usb0_host_ConfigNum = 0;
123
124 for (loop = 0; loop < (USB_HOST_MAX_PIPE_NO + 1); ++loop)
125 {
126 g_usb0_host_pipe_status[loop] = USB_HOST_PIPE_IDLE;
127 g_usb0_host_PipeDataSize[loop] = 0;
128
129 /* pipe configuration in usb0_host_resetEP() */
130 g_usb0_host_pipecfg[loop] = 0;
131 g_usb0_host_pipebuf[loop] = 0;
132 g_usb0_host_pipemaxp[loop] = 0;
133 g_usb0_host_pipeperi[loop] = 0;
134 }
135 }
136
137 /* End of File */
Imprint / Impressum