USBHost library. NOTE: This library is only officially supported on the LPC1768 platform. For more information, please see the handbook page.
Dependencies: FATFileSystem mbed-rtos
Dependents: BTstack WallbotWii SD to Flash Data Transfer USBHost-MSD_HelloWorld ... more
Legacy Warning
This is an mbed 2 library. To learn more about mbed OS 5, visit the docs.
Pull requests against this repository are no longer supported. Please raise against mbed OS 5 as documented above.
targets/TARGET_RENESAS/TARGET_VK_RZ_A1H/usb1/inc/usb1_host_api.h@39:d96aa62afc5b, 2017-07-27 (annotated)
- Committer:
- Kojto
- Date:
- Thu Jul 27 12:24:30 2017 +0100
- Revision:
- 39:d96aa62afc5b
Update USBHost - add targets directory
This corresponds to mbed-os/master commit 9207365
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 39:d96aa62afc5b | 1 | /******************************************************************************* |
Kojto | 39:d96aa62afc5b | 2 | * DISCLAIMER |
Kojto | 39:d96aa62afc5b | 3 | * This software is supplied by Renesas Electronics Corporation and is only |
Kojto | 39:d96aa62afc5b | 4 | * intended for use with Renesas products. No other uses are authorized. This |
Kojto | 39:d96aa62afc5b | 5 | * software is owned by Renesas Electronics Corporation and is protected under |
Kojto | 39:d96aa62afc5b | 6 | * all applicable laws, including copyright laws. |
Kojto | 39:d96aa62afc5b | 7 | * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING |
Kojto | 39:d96aa62afc5b | 8 | * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT |
Kojto | 39:d96aa62afc5b | 9 | * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE |
Kojto | 39:d96aa62afc5b | 10 | * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. |
Kojto | 39:d96aa62afc5b | 11 | * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS |
Kojto | 39:d96aa62afc5b | 12 | * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE |
Kojto | 39:d96aa62afc5b | 13 | * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR |
Kojto | 39:d96aa62afc5b | 14 | * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE |
Kojto | 39:d96aa62afc5b | 15 | * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
Kojto | 39:d96aa62afc5b | 16 | * Renesas reserves the right, without notice, to make changes to this software |
Kojto | 39:d96aa62afc5b | 17 | * and to discontinue the availability of this software. By using this software, |
Kojto | 39:d96aa62afc5b | 18 | * you agree to the additional terms and conditions found by accessing the |
Kojto | 39:d96aa62afc5b | 19 | * following link: |
Kojto | 39:d96aa62afc5b | 20 | * http://www.renesas.com/disclaimer |
Kojto | 39:d96aa62afc5b | 21 | * Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved. |
Kojto | 39:d96aa62afc5b | 22 | *******************************************************************************/ |
Kojto | 39:d96aa62afc5b | 23 | /******************************************************************************* |
Kojto | 39:d96aa62afc5b | 24 | * File Name : usb1_host_api.h |
Kojto | 39:d96aa62afc5b | 25 | * $Rev: 1116 $ |
Kojto | 39:d96aa62afc5b | 26 | * $Date:: 2014-07-09 16:29:19 +0900#$ |
Kojto | 39:d96aa62afc5b | 27 | * Description : RZ/A1H R7S72100 USB Sample Program |
Kojto | 39:d96aa62afc5b | 28 | *******************************************************************************/ |
Kojto | 39:d96aa62afc5b | 29 | #ifndef USB1_HOST_API_H |
Kojto | 39:d96aa62afc5b | 30 | #define USB1_HOST_API_H |
Kojto | 39:d96aa62afc5b | 31 | |
Kojto | 39:d96aa62afc5b | 32 | |
Kojto | 39:d96aa62afc5b | 33 | /******************************************************************************* |
Kojto | 39:d96aa62afc5b | 34 | Typedef definitions |
Kojto | 39:d96aa62afc5b | 35 | *******************************************************************************/ |
Kojto | 39:d96aa62afc5b | 36 | |
Kojto | 39:d96aa62afc5b | 37 | |
Kojto | 39:d96aa62afc5b | 38 | /******************************************************************************* |
Kojto | 39:d96aa62afc5b | 39 | Macro definitions |
Kojto | 39:d96aa62afc5b | 40 | *******************************************************************************/ |
Kojto | 39:d96aa62afc5b | 41 | |
Kojto | 39:d96aa62afc5b | 42 | |
Kojto | 39:d96aa62afc5b | 43 | /******************************************************************************* |
Kojto | 39:d96aa62afc5b | 44 | Variable Externs |
Kojto | 39:d96aa62afc5b | 45 | *******************************************************************************/ |
Kojto | 39:d96aa62afc5b | 46 | |
Kojto | 39:d96aa62afc5b | 47 | |
Kojto | 39:d96aa62afc5b | 48 | /******************************************************************************* |
Kojto | 39:d96aa62afc5b | 49 | Functions Prototypes |
Kojto | 39:d96aa62afc5b | 50 | *******************************************************************************/ |
Kojto | 39:d96aa62afc5b | 51 | void usb1_host_interrupt(uint32_t int_sense); |
Kojto | 39:d96aa62afc5b | 52 | void usb1_host_dma_interrupt_d0fifo(uint32_t int_sense); |
Kojto | 39:d96aa62afc5b | 53 | void usb1_host_dma_interrupt_d1fifo(uint32_t int_sense); |
Kojto | 39:d96aa62afc5b | 54 | |
Kojto | 39:d96aa62afc5b | 55 | uint16_t usb1_api_host_init(uint8_t int_level, uint16_t mode, uint16_t clockmode); |
Kojto | 39:d96aa62afc5b | 56 | int32_t usb1_api_host_enumeration(uint16_t devadr); |
Kojto | 39:d96aa62afc5b | 57 | int32_t usb1_api_host_detach(void); |
Kojto | 39:d96aa62afc5b | 58 | int32_t usb1_api_host_data_in(uint16_t devadr, uint16_t Pipe, uint32_t Size, uint8_t *data_buf); |
Kojto | 39:d96aa62afc5b | 59 | int32_t usb1_api_host_data_out(uint16_t devadr, uint16_t Pipe, uint32_t Size, uint8_t *data_buf); |
Kojto | 39:d96aa62afc5b | 60 | int32_t usb1_api_host_control_transfer(uint16_t devadr, uint16_t Req, uint16_t Val, uint16_t Indx, uint16_t Len, uint8_t *Buf); |
Kojto | 39:d96aa62afc5b | 61 | int32_t usb1_api_host_set_endpoint(uint16_t devadr, USB_HOST_CFG_PIPETBL_t *user_table, uint8_t *configdescriptor); |
Kojto | 39:d96aa62afc5b | 62 | int32_t usb1_api_host_clear_endpoint(USB_HOST_CFG_PIPETBL_t *user_table); |
Kojto | 39:d96aa62afc5b | 63 | int32_t usb1_api_host_clear_endpoint_pipe(uint16_t pipe_sel, USB_HOST_CFG_PIPETBL_t *user_table); |
Kojto | 39:d96aa62afc5b | 64 | uint16_t usb1_api_host_SetEndpointTable(uint16_t devadr, USB_HOST_CFG_PIPETBL_t *user_table, uint8_t *Table); |
Kojto | 39:d96aa62afc5b | 65 | int32_t usb1_api_host_data_count(uint16_t pipe, uint32_t *data_count); |
Kojto | 39:d96aa62afc5b | 66 | |
Kojto | 39:d96aa62afc5b | 67 | int32_t usb1_api_host_GetDeviceDescriptor(uint16_t devadr, uint16_t size, uint8_t *buf); |
Kojto | 39:d96aa62afc5b | 68 | int32_t usb1_api_host_GetConfigDescriptor(uint16_t devadr, uint16_t size, uint8_t *buf); |
Kojto | 39:d96aa62afc5b | 69 | int32_t usb1_api_host_SetConfig(uint16_t devadr, uint16_t confignum); |
Kojto | 39:d96aa62afc5b | 70 | int32_t usb1_api_host_SetInterface(uint16_t devadr, uint16_t interface_alt, uint16_t interface_index); |
Kojto | 39:d96aa62afc5b | 71 | int32_t usb1_api_host_ClearStall(uint16_t devadr, uint16_t ep_dir); |
Kojto | 39:d96aa62afc5b | 72 | uint16_t usb1_api_host_GetUsbDeviceState(void); |
Kojto | 39:d96aa62afc5b | 73 | |
Kojto | 39:d96aa62afc5b | 74 | void usb1_api_host_elt_4_4(void); |
Kojto | 39:d96aa62afc5b | 75 | void usb1_api_host_elt_4_5(void); |
Kojto | 39:d96aa62afc5b | 76 | void usb1_api_host_elt_4_6(void); |
Kojto | 39:d96aa62afc5b | 77 | void usb1_api_host_elt_4_7(void); |
Kojto | 39:d96aa62afc5b | 78 | void usb1_api_host_elt_4_8(void); |
Kojto | 39:d96aa62afc5b | 79 | void usb1_api_host_elt_4_9(void); |
Kojto | 39:d96aa62afc5b | 80 | void usb1_api_host_elt_get_desc(void); |
Kojto | 39:d96aa62afc5b | 81 | |
Kojto | 39:d96aa62afc5b | 82 | void usb1_host_EL_ModeInit(void); |
Kojto | 39:d96aa62afc5b | 83 | void usb1_host_EL_SetUACT(void); |
Kojto | 39:d96aa62afc5b | 84 | void usb1_host_EL_ClearUACT(void); |
Kojto | 39:d96aa62afc5b | 85 | void usb1_host_EL_SetTESTMODE(uint16_t mode); |
Kojto | 39:d96aa62afc5b | 86 | void usb1_host_EL_ClearNRDYSTS(uint16_t pipe); |
Kojto | 39:d96aa62afc5b | 87 | uint16_t usb1_host_EL_GetINTSTS1(void); |
Kojto | 39:d96aa62afc5b | 88 | void usb1_host_EL_UsbBusReset(void); |
Kojto | 39:d96aa62afc5b | 89 | void usb1_host_EL_UsbAttach(void); |
Kojto | 39:d96aa62afc5b | 90 | void usb1_host_EL_SetupStage(uint16_t Req, uint16_t Val, uint16_t Indx, uint16_t Len); |
Kojto | 39:d96aa62afc5b | 91 | void usb1_host_EL_StatusStage(void); |
Kojto | 39:d96aa62afc5b | 92 | void usb1_host_EL_CtrlReadStart(uint32_t Bsize, uint8_t *Table); |
Kojto | 39:d96aa62afc5b | 93 | int32_t usb1_host_EL_UsbSuspend(void); |
Kojto | 39:d96aa62afc5b | 94 | int32_t usb1_host_EL_UsbResume(void); |
Kojto | 39:d96aa62afc5b | 95 | |
Kojto | 39:d96aa62afc5b | 96 | #if 0 /* prototype in devdrv_usb_host_api.h */ |
Kojto | 39:d96aa62afc5b | 97 | uint16_t Userdef_USB_usb1_host_d0fifo_dmaintid(void); |
Kojto | 39:d96aa62afc5b | 98 | uint16_t Userdef_USB_usb1_host_d1fifo_dmaintid(void); |
Kojto | 39:d96aa62afc5b | 99 | void Userdef_USB_usb1_host_attach(void); |
Kojto | 39:d96aa62afc5b | 100 | void Userdef_USB_usb1_host_detach(void); |
Kojto | 39:d96aa62afc5b | 101 | void Userdef_USB_usb1_host_delay_1ms(void); |
Kojto | 39:d96aa62afc5b | 102 | void Userdef_USB_usb1_host_delay_xms(uint32_t msec); |
Kojto | 39:d96aa62afc5b | 103 | void Userdef_USB_usb1_host_delay_10us(uint32_t usec); |
Kojto | 39:d96aa62afc5b | 104 | void Userdef_USB_usb1_host_delay_500ns(void); |
Kojto | 39:d96aa62afc5b | 105 | void Userdef_USB_usb1_host_start_dma(USB_HOST_DMA_t *dma, uint16_t dfacc); |
Kojto | 39:d96aa62afc5b | 106 | uint32_t Userdef_USB_usb1_host_stop_dma0(void); |
Kojto | 39:d96aa62afc5b | 107 | uint32_t Userdef_USB_usb1_host_stop_dma1(void); |
Kojto | 39:d96aa62afc5b | 108 | #endif |
Kojto | 39:d96aa62afc5b | 109 | |
Kojto | 39:d96aa62afc5b | 110 | #endif /* USB1_HOST_API_H */ |
Kojto | 39:d96aa62afc5b | 111 | |
Kojto | 39:d96aa62afc5b | 112 | /* End of File */ |