]>
git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/USBDevice/USBDevice/TARGET_RENESAS/TARGET_RZ_A1H/usb1/inc/usb1_function_api.h
1 /*******************************************************************************
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
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
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
36 /*******************************************************************************
37 Includes <System Includes> , "Project Includes"
38 *******************************************************************************/
41 /*******************************************************************************
43 *******************************************************************************/
46 /*******************************************************************************
48 *******************************************************************************/
51 /*******************************************************************************
53 *******************************************************************************/
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
);
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
);
102 #endif /* USB1_FUNCTION_API_H */