Skip to content

Commit 1de9187

Browse files
committed
Merge pull request #8 from mbedmicro/master
Synd with master (27 April 2015)
2 parents 0cf5f89 + 7c1fba2 commit 1de9187

File tree

799 files changed

+95656
-69481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

799 files changed

+95656
-69481
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
---
2-
python:
1+
---
2+
python:
33
- "2.7"
44
script: "python workspace_tools/build_travis.py"
55
install:
66
- "sudo $TRAVIS_BUILD_DIR/travis/install_dependencies.sh > /dev/null"
77
- sudo pip install colorama
8-
- sudo pip install prettytable
8+
- sudo pip install prettytable
9+
- sudo pip install jinja2

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ You can for example read more in our ```docs``` section in [mbedmicro/mbed/doc](
1010
# How to contribute
1111
We really appreciate your contributions! We are Open Source project and we need your help. We want to keep it as easy as possible to contribute changes that get things working in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
1212

13+
Before a pull request will be merged, the [mbed Contributor Agreement](http://developer.mbed.org/contributor_agreement/) must be signed.
14+
1315
You can pick up existing [mbed GitHub Issue](https://github.com/mbedmicro/mbed/issues) and solve it or implement new feature you find important, attractive or just necessary. We will review your proposal via pull request mechanism, give you comments and merge your changes if we decide your contribution satisfy criteria such as quality.
1416

1517
# Enhancements vs Bugs

libraries/USBDevice/USBAudio/USBAudio.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ float USBAudio::getVolume() {
119119
}
120120

121121

122-
bool USBAudio::EP3_OUT_callback() {
122+
bool USBAudio::EPISO_OUT_callback() {
123123
uint32_t size = 0;
124124
interruptOUT = true;
125125
if (buf_stream_in != NULL) {
@@ -132,7 +132,7 @@ bool USBAudio::EP3_OUT_callback() {
132132
}
133133

134134

135-
bool USBAudio::EP3_IN_callback() {
135+
bool USBAudio::EPISO_IN_callback() {
136136
interruptIN = true;
137137
writeIN = true;
138138
return true;

libraries/USBDevice/USBAudio/USBAudio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,12 @@ class USBAudio: public USBDevice {
216216
/*
217217
* Callback called when a packet is received
218218
*/
219-
virtual bool EP3_OUT_callback();
219+
virtual bool EPISO_OUT_callback();
220220

221221
/*
222222
* Callback called when a packet has been sent
223223
*/
224-
virtual bool EP3_IN_callback();
224+
virtual bool EPISO_IN_callback();
225225

226226
private:
227227

libraries/USBDevice/USBDevice/TARGET_RENESAS/TARGET_RZ_A1H/inc/devdrv_usb_function_api.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ Includes <System Includes> , "Project Includes"
3636
#include <MBRZA1H.h>
3737
#include "r_typedefs.h"
3838
#include "usb0_function_api.h"
39-
#if 0
4039
#include "usb1_function_api.h"
41-
#endif
4240

4341

4442
#ifdef __cplusplus
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
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 : usb1_function.h
25+
* $Rev: 1116 $
26+
* $Date:: 2014-07-09 16:29:19 +0900#$
27+
* Description : RZ/A1H R7S72100 USB Sample Program
28+
*******************************************************************************/
29+
#ifndef USB1_FUNCTION_H
30+
#define USB1_FUNCTION_H
31+
32+
33+
/*******************************************************************************
34+
Includes <System Includes> , "Project Includes"
35+
*******************************************************************************/
36+
#include "devdrv_usb_function_api.h"
37+
#include "usb_function.h"
38+
39+
40+
#ifdef __cplusplus
41+
extern "C" {
42+
#endif
43+
44+
/*******************************************************************************
45+
Typedef definitions
46+
*******************************************************************************/
47+
48+
49+
/*******************************************************************************
50+
Macro definitions
51+
*******************************************************************************/
52+
53+
54+
/*******************************************************************************
55+
Imported global variables and functions (from other files)
56+
*******************************************************************************/
57+
extern const uint16_t g_usb1_function_bit_set[];
58+
extern uint32_t g_usb1_function_data_count[USB_FUNCTION_MAX_PIPE_NO + 1];
59+
extern uint8_t *g_usb1_function_data_pointer[USB_FUNCTION_MAX_PIPE_NO + 1];
60+
61+
extern uint16_t g_usb1_function_PipeIgnore[];
62+
extern uint16_t g_usb1_function_PipeTbl[];
63+
extern uint16_t g_usb1_function_pipe_status[];
64+
extern uint32_t g_usb1_function_PipeDataSize[];
65+
66+
extern USB_FUNCTION_DMA_t g_usb1_function_DmaInfo[];
67+
extern uint16_t g_usb1_function_DmaPipe[];
68+
extern uint16_t g_usb1_function_DmaBval[];
69+
extern uint16_t g_usb1_function_DmaStatus[];
70+
71+
extern uint16_t g_usb1_function_CtrZeroLengthFlag;
72+
73+
extern uint16_t g_usb1_function_ConfigNum;
74+
extern uint16_t g_usb1_function_Alternate[USB_FUNCTION_ALT_NO];
75+
extern uint16_t g_usb1_function_RemoteWakeupFlag;
76+
extern uint16_t g_usb1_function_TestModeFlag;
77+
extern uint16_t g_usb1_function_TestModeSelectors;
78+
79+
extern uint16_t g_usb1_function_ReqType;
80+
extern uint16_t g_usb1_function_ReqTypeType;
81+
extern uint16_t g_usb1_function_ReqTypeRecip;
82+
extern uint16_t g_usb1_function_ReqRequest;
83+
extern uint16_t g_usb1_function_ReqValue;
84+
extern uint16_t g_usb1_function_ReqIndex;
85+
extern uint16_t g_usb1_function_ReqLength;
86+
87+
extern uint16_t g_usb1_function_EPTableIndex[USB_FUNCTION_MAX_EP_NO + 1];
88+
89+
extern uint16_t g_usb1_function_pipecfg[USB_FUNCTION_MAX_PIPE_NO + 1];
90+
extern uint16_t g_usb1_function_pipebuf[USB_FUNCTION_MAX_PIPE_NO + 1];
91+
extern uint16_t g_usb1_function_pipemaxp[USB_FUNCTION_MAX_PIPE_NO + 1];
92+
extern uint16_t g_usb1_function_pipeperi[USB_FUNCTION_MAX_PIPE_NO + 1];
93+
94+
95+
/*******************************************************************************
96+
Exported global variables and functions (to be accessed by other files)
97+
*******************************************************************************/
98+
/* ==== common ==== */
99+
void usb1_function_dma_stop_d0(uint16_t pipe, uint32_t remain);
100+
void usb1_function_dma_stop_d1(uint16_t pipe, uint32_t remain);
101+
uint16_t usb1_function_is_hispeed(void);
102+
uint16_t usb1_function_is_hispeed_enable(void);
103+
uint16_t usb1_function_start_send_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
104+
uint16_t usb1_function_write_buffer(uint16_t pipe);
105+
uint16_t usb1_function_write_buffer_c(uint16_t pipe);
106+
uint16_t usb1_function_write_buffer_d0(uint16_t pipe);
107+
uint16_t usb1_function_write_buffer_d1(uint16_t pipe);
108+
void usb1_function_start_receive_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
109+
uint16_t usb1_function_read_buffer(uint16_t pipe);
110+
uint16_t usb1_function_read_buffer_c(uint16_t pipe);
111+
uint16_t usb1_function_read_buffer_d0(uint16_t pipe);
112+
uint16_t usb1_function_read_buffer_d1(uint16_t pipe);
113+
uint16_t usb1_function_change_fifo_port(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw);
114+
void usb1_function_set_curpipe(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw);
115+
void usb1_function_set_curpipe2(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw, uint16_t dfacc);
116+
uint16_t usb1_function_get_mbw(uint32_t trncount, uint32_t dtptr);
117+
uint16_t usb1_function_read_dma(uint16_t pipe);
118+
void usb1_function_brdy_int(uint16_t status, uint16_t int_enb);
119+
void usb1_function_nrdy_int(uint16_t status, uint16_t int_enb);
120+
void usb1_function_bemp_int(uint16_t status, uint16_t int_enb);
121+
void usb1_function_setting_interrupt(uint8_t level);
122+
void usb1_function_reset_module(uint16_t clockmode);
123+
uint16_t usb1_function_get_buf_size(uint16_t pipe);
124+
uint16_t usb1_function_get_mxps(uint16_t pipe);
125+
void usb1_function_clear_brdy_sts(uint16_t pipe);
126+
void usb1_function_clear_bemp_sts(uint16_t pipe);
127+
void usb1_function_clear_nrdy_sts(uint16_t pipe);
128+
void usb1_function_set_pid_buf(uint16_t pipe);
129+
void usb1_function_set_pid_nak(uint16_t pipe);
130+
void usb1_function_set_pid_stall(uint16_t pipe);
131+
void usb1_function_clear_pid_stall(uint16_t pipe);
132+
uint16_t usb1_function_get_pid(uint16_t pipe);
133+
void usb1_function_set_sqclr(uint16_t pipe);
134+
void usb1_function_set_sqset(uint16_t pipe);
135+
void usb1_function_set_csclr(uint16_t pipe);
136+
void usb1_function_aclrm(uint16_t pipe);
137+
void usb1_function_set_aclrm(uint16_t pipe);
138+
void usb1_function_clr_aclrm(uint16_t pipe);
139+
uint16_t usb1_function_get_sqmon(uint16_t pipe);
140+
uint16_t usb1_function_get_inbuf(uint16_t pipe);
141+
142+
/* ==== function ==== */
143+
void usb1_function_init_status(void);
144+
void usb1_function_InitModule(uint16_t mode);
145+
uint16_t usb1_function_CheckVBUStaus(void);
146+
void usb1_function_USB_FUNCTION_Attach(void);
147+
void usb1_function_USB_FUNCTION_Detach(void);
148+
void usb1_function_USB_FUNCTION_BusReset(void);
149+
void usb1_function_USB_FUNCTION_Resume(void);
150+
void usb1_function_USB_FUNCTION_Suspend(void);
151+
void usb1_function_USB_FUNCTION_TestMode(void);
152+
void usb1_function_ResetDCP(void);
153+
void usb1_function_ResetEP(uint16_t num);
154+
uint16_t usb1_function_EpToPipe(uint16_t ep);
155+
void usb1_function_InitEPTable(uint16_t Con_Num, uint16_t Int_Num, uint16_t Alt_Num);
156+
uint16_t usb1_function_GetConfigNum(void);
157+
uint16_t usb1_function_GetAltNum(uint16_t Con_Num, uint16_t Int_Num);
158+
uint16_t usb1_function_CheckRemoteWakeup(void);
159+
void usb1_function_clear_alt(void);
160+
void usb1_function_clear_pipe_tbl(void);
161+
void usb1_function_clear_ep_table_index(void);
162+
uint16_t usb1_function_GetInterfaceNum(uint16_t num);
163+
164+
#ifdef __cplusplus
165+
}
166+
#endif
167+
168+
169+
#endif /* USB1_FUNCTION_H */
170+
171+
/* End of File */
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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 : usb1_function_api.h
25+
* $Rev: 1116 $
26+
* $Date:: 2014-07-09 16:29:19 +0900#$
27+
* Description : RZ/A1H R7S72100 USB Sample Program
28+
*******************************************************************************/
29+
#ifndef USB1_FUNCTION_API_H
30+
#define USB1_FUNCTION_API_H
31+
32+
#ifdef __cplusplus
33+
extern "C" {
34+
#endif
35+
36+
/*******************************************************************************
37+
Includes <System Includes> , "Project Includes"
38+
*******************************************************************************/
39+
40+
41+
/*******************************************************************************
42+
Typedef definitions
43+
*******************************************************************************/
44+
45+
46+
/*******************************************************************************
47+
Macro definitions
48+
*******************************************************************************/
49+
50+
51+
/*******************************************************************************
52+
Variable Externs
53+
*******************************************************************************/
54+
55+
56+
/*******************************************************************************
57+
Exported global variables and functions (to be accessed by other files)
58+
*******************************************************************************/
59+
void usb1_api_function_init(uint8_t int_level, uint16_t mode, uint16_t clockmode);
60+
uint16_t usb1_api_function_IsConfigured(void);
61+
uint16_t usb1_function_GetDeviceState(void);
62+
uint16_t usb1_api_function_CtrlReadStart(uint32_t size, uint8_t *data);
63+
void usb1_api_function_CtrlWriteStart(uint32_t size, uint8_t *data);
64+
uint16_t usb1_api_function_start_send_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
65+
uint16_t usb1_api_function_check_pipe_status(uint16_t pipe, uint32_t *size);
66+
void usb1_api_function_clear_pipe_status(uint16_t pipe);
67+
void usb1_api_function_start_receive_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
68+
void usb1_api_function_set_pid_buf(uint16_t pipe);
69+
void usb1_api_function_set_pid_nak(uint16_t pipe);
70+
void usb1_api_function_set_pid_stall(uint16_t pipe);
71+
void usb1_api_function_clear_pid_stall(uint16_t pipe);
72+
uint16_t usb1_api_function_get_pid(uint16_t pipe);
73+
int32_t usb1_api_function_check_stall(uint16_t pipe);
74+
void usb1_api_function_set_sqclr(uint16_t pipe);
75+
void usb1_api_function_set_sqset(uint16_t pipe);
76+
void usb1_api_function_set_csclr(uint16_t pipe);
77+
void usb1_api_function_set_curpipe(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw);
78+
void usb1_api_function_clear_brdy_sts(uint16_t pipe);
79+
void usb1_api_function_clear_bemp_sts(uint16_t pipe);
80+
void usb1_api_function_clear_nrdy_sts(uint16_t pipe);
81+
82+
void usb1_function_ClearFeature(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
83+
void usb1_function_SetFeature(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
84+
void usb1_function_SetAddress(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
85+
void usb1_function_SetDescriptor(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
86+
void usb1_function_SetConfiguration(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
87+
void usb1_function_SetInterface(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
88+
void usb1_function_SynchFrame(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
89+
void usb1_function_GetStatus(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
90+
void usb1_function_GetDescriptor(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
91+
void usb1_function_GetConfiguration(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
92+
void usb1_function_GetInterface(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
93+
void usb1_function_Resrv_0(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
94+
void usb1_function_Resrv_123(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
95+
void usb1_function_Resrv_4(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
96+
void usb1_function_Resrv_5(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
97+
98+
#ifdef __cplusplus
99+
}
100+
#endif
101+
102+
#endif /* USB1_FUNCTION_API_H */
103+
104+
/* End of File */

0 commit comments

Comments
 (0)