summaryrefslogtreecommitdiff
path: root/tool/mbed/mbed-sdk/libraries/USBDevice/USBDevice/TARGET_RENESAS/TARGET_RZ_A1H/usb1/inc/usb1_function_api.h
blob: 7e78076d9a3b5c68620e145332b400740771a8fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*******************************************************************************
* 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    : usb1_function_api.h
* $Rev: 1116 $
* $Date:: 2014-07-09 16:29:19 +0900#$
* Description  : RZ/A1H R7S72100 USB Sample Program
*******************************************************************************/
#ifndef USB1_FUNCTION_API_H
#define USB1_FUNCTION_API_H

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
Includes   <System Includes> , "Project Includes"
*******************************************************************************/


/*******************************************************************************
Typedef definitions
*******************************************************************************/


/*******************************************************************************
Macro definitions
*******************************************************************************/


/*******************************************************************************
Variable Externs
*******************************************************************************/


/*******************************************************************************
Exported global variables and functions (to be accessed by other files)
*******************************************************************************/
void     usb1_api_function_init(uint8_t int_level, uint16_t mode, uint16_t clockmode);
uint16_t usb1_api_function_IsConfigured(void);
uint16_t usb1_function_GetDeviceState(void);
uint16_t usb1_api_function_CtrlReadStart(uint32_t size, uint8_t *data);
void     usb1_api_function_CtrlWriteStart(uint32_t size, uint8_t *data);
uint16_t usb1_api_function_start_send_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
uint16_t usb1_api_function_check_pipe_status(uint16_t pipe, uint32_t *size);
void     usb1_api_function_clear_pipe_status(uint16_t pipe);
void     usb1_api_function_start_receive_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
void     usb1_api_function_set_pid_buf(uint16_t pipe);
void     usb1_api_function_set_pid_nak(uint16_t pipe);
void     usb1_api_function_set_pid_stall(uint16_t pipe);
void     usb1_api_function_clear_pid_stall(uint16_t pipe);
uint16_t usb1_api_function_get_pid(uint16_t pipe);
int32_t  usb1_api_function_check_stall(uint16_t pipe);
void     usb1_api_function_set_sqclr(uint16_t pipe);
void     usb1_api_function_set_sqset(uint16_t pipe);
void     usb1_api_function_set_csclr(uint16_t pipe);
void     usb1_api_function_set_curpipe(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw);
void     usb1_api_function_clear_brdy_sts(uint16_t pipe);
void     usb1_api_function_clear_bemp_sts(uint16_t pipe);
void     usb1_api_function_clear_nrdy_sts(uint16_t pipe);

void     usb1_function_ClearFeature(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_SetFeature(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_SetAddress(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_SetDescriptor(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_SetConfiguration(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_SetInterface(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_SynchFrame(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_GetStatus(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_GetDescriptor(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_GetConfiguration(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_GetInterface(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_Resrv_0(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_Resrv_123(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_Resrv_4(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void     usb1_function_Resrv_5(uint16_t type, uint16_t value, uint16_t index, uint16_t length);

#ifdef __cplusplus
}
#endif

#endif /* USB1_FUNCTION_API_H */

/* End of File */