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.
USBHost/TARGET_RENESAS/TARGET_VK_RZ_A1H/usb0/inc/usb0_host.h@35:f72ccc6892ee, 2016-04-29 (annotated)
- Committer:
- mbed_official
- Date:
- Fri Apr 29 01:16:38 2016 +0100
- Revision:
- 35:f72ccc6892ee
Synchronized with git revision fe9720f24b1adc71ab6962506ec51290f6afd270
Full URL: https://github.com/mbedmicro/mbed/commit/fe9720f24b1adc71ab6962506ec51290f6afd270/
[Renesas RZ/A1H] Enable asynchronous communications
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 35:f72ccc6892ee | 1 | /******************************************************************************* |
mbed_official | 35:f72ccc6892ee | 2 | * DISCLAIMER |
mbed_official | 35:f72ccc6892ee | 3 | * This software is supplied by Renesas Electronics Corporation and is only |
mbed_official | 35:f72ccc6892ee | 4 | * intended for use with Renesas products. No other uses are authorized. This |
mbed_official | 35:f72ccc6892ee | 5 | * software is owned by Renesas Electronics Corporation and is protected under |
mbed_official | 35:f72ccc6892ee | 6 | * all applicable laws, including copyright laws. |
mbed_official | 35:f72ccc6892ee | 7 | * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING |
mbed_official | 35:f72ccc6892ee | 8 | * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT |
mbed_official | 35:f72ccc6892ee | 9 | * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE |
mbed_official | 35:f72ccc6892ee | 10 | * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. |
mbed_official | 35:f72ccc6892ee | 11 | * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS |
mbed_official | 35:f72ccc6892ee | 12 | * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE |
mbed_official | 35:f72ccc6892ee | 13 | * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR |
mbed_official | 35:f72ccc6892ee | 14 | * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE |
mbed_official | 35:f72ccc6892ee | 15 | * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
mbed_official | 35:f72ccc6892ee | 16 | * Renesas reserves the right, without notice, to make changes to this software |
mbed_official | 35:f72ccc6892ee | 17 | * and to discontinue the availability of this software. By using this software, |
mbed_official | 35:f72ccc6892ee | 18 | * you agree to the additional terms and conditions found by accessing the |
mbed_official | 35:f72ccc6892ee | 19 | * following link: |
mbed_official | 35:f72ccc6892ee | 20 | * http://www.renesas.com/disclaimer |
mbed_official | 35:f72ccc6892ee | 21 | * Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved. |
mbed_official | 35:f72ccc6892ee | 22 | *******************************************************************************/ |
mbed_official | 35:f72ccc6892ee | 23 | /******************************************************************************* |
mbed_official | 35:f72ccc6892ee | 24 | * File Name : usb0_host.h |
mbed_official | 35:f72ccc6892ee | 25 | * $Rev: 1116 $ |
mbed_official | 35:f72ccc6892ee | 26 | * $Date:: 2014-07-09 16:29:19 +0900#$ |
mbed_official | 35:f72ccc6892ee | 27 | * Description : RZ/A1H R7S72100 USB Sample Program |
mbed_official | 35:f72ccc6892ee | 28 | *******************************************************************************/ |
mbed_official | 35:f72ccc6892ee | 29 | #ifndef USB0_HOST_H |
mbed_official | 35:f72ccc6892ee | 30 | #define USB0_HOST_H |
mbed_official | 35:f72ccc6892ee | 31 | |
mbed_official | 35:f72ccc6892ee | 32 | /******************************************************************************* |
mbed_official | 35:f72ccc6892ee | 33 | Includes <System Includes> , "Project Includes" |
mbed_official | 35:f72ccc6892ee | 34 | *******************************************************************************/ |
mbed_official | 35:f72ccc6892ee | 35 | #include "devdrv_usb_host_api.h" |
mbed_official | 35:f72ccc6892ee | 36 | #include "usb_host.h" |
mbed_official | 35:f72ccc6892ee | 37 | |
mbed_official | 35:f72ccc6892ee | 38 | /******************************************************************************* |
mbed_official | 35:f72ccc6892ee | 39 | Imported global variables and functions (from other files) |
mbed_official | 35:f72ccc6892ee | 40 | *******************************************************************************/ |
mbed_official | 35:f72ccc6892ee | 41 | extern const uint16_t g_usb0_host_bit_set[]; |
mbed_official | 35:f72ccc6892ee | 42 | extern uint32_t g_usb0_host_data_count[USB_HOST_MAX_PIPE_NO + 1]; |
mbed_official | 35:f72ccc6892ee | 43 | extern uint8_t *g_usb0_host_data_pointer[USB_HOST_MAX_PIPE_NO + 1]; |
mbed_official | 35:f72ccc6892ee | 44 | |
mbed_official | 35:f72ccc6892ee | 45 | extern uint16_t g_usb0_host_PipeIgnore[]; |
mbed_official | 35:f72ccc6892ee | 46 | extern uint16_t g_usb0_host_PipeTbl[]; |
mbed_official | 35:f72ccc6892ee | 47 | extern uint16_t g_usb0_host_pipe_status[]; |
mbed_official | 35:f72ccc6892ee | 48 | extern uint32_t g_usb0_host_PipeDataSize[]; |
mbed_official | 35:f72ccc6892ee | 49 | |
mbed_official | 35:f72ccc6892ee | 50 | extern USB_HOST_DMA_t g_usb0_host_DmaInfo[]; |
mbed_official | 35:f72ccc6892ee | 51 | extern uint16_t g_usb0_host_DmaPipe[]; |
mbed_official | 35:f72ccc6892ee | 52 | extern uint16_t g_usb0_host_DmaBval[]; |
mbed_official | 35:f72ccc6892ee | 53 | extern uint16_t g_usb0_host_DmaStatus[]; |
mbed_official | 35:f72ccc6892ee | 54 | |
mbed_official | 35:f72ccc6892ee | 55 | extern uint16_t g_usb0_host_driver_state; |
mbed_official | 35:f72ccc6892ee | 56 | extern uint16_t g_usb0_host_ConfigNum; |
mbed_official | 35:f72ccc6892ee | 57 | extern uint16_t g_usb0_host_CmdStage; |
mbed_official | 35:f72ccc6892ee | 58 | extern uint16_t g_usb0_host_bchg_flag; |
mbed_official | 35:f72ccc6892ee | 59 | extern uint16_t g_usb0_host_detach_flag; |
mbed_official | 35:f72ccc6892ee | 60 | extern uint16_t g_usb0_host_attach_flag; |
mbed_official | 35:f72ccc6892ee | 61 | |
mbed_official | 35:f72ccc6892ee | 62 | extern uint16_t g_usb0_host_UsbAddress; |
mbed_official | 35:f72ccc6892ee | 63 | extern uint16_t g_usb0_host_setUsbAddress; |
mbed_official | 35:f72ccc6892ee | 64 | extern uint16_t g_usb0_host_default_max_packet[USB_HOST_MAX_DEVICE + 1]; |
mbed_official | 35:f72ccc6892ee | 65 | extern uint16_t g_usb0_host_UsbDeviceSpeed; |
mbed_official | 35:f72ccc6892ee | 66 | extern uint16_t g_usb0_host_SupportUsbDeviceSpeed; |
mbed_official | 35:f72ccc6892ee | 67 | |
mbed_official | 35:f72ccc6892ee | 68 | extern uint16_t g_usb0_host_SavReq; |
mbed_official | 35:f72ccc6892ee | 69 | extern uint16_t g_usb0_host_SavVal; |
mbed_official | 35:f72ccc6892ee | 70 | extern uint16_t g_usb0_host_SavIndx; |
mbed_official | 35:f72ccc6892ee | 71 | extern uint16_t g_usb0_host_SavLen; |
mbed_official | 35:f72ccc6892ee | 72 | |
mbed_official | 35:f72ccc6892ee | 73 | extern uint16_t g_usb0_host_pipecfg[USB_HOST_MAX_PIPE_NO + 1]; |
mbed_official | 35:f72ccc6892ee | 74 | extern uint16_t g_usb0_host_pipebuf[USB_HOST_MAX_PIPE_NO + 1]; |
mbed_official | 35:f72ccc6892ee | 75 | extern uint16_t g_usb0_host_pipemaxp[USB_HOST_MAX_PIPE_NO + 1]; |
mbed_official | 35:f72ccc6892ee | 76 | extern uint16_t g_usb0_host_pipeperi[USB_HOST_MAX_PIPE_NO + 1]; |
mbed_official | 35:f72ccc6892ee | 77 | |
mbed_official | 35:f72ccc6892ee | 78 | /******************************************************************************* |
mbed_official | 35:f72ccc6892ee | 79 | Functions Prototypes |
mbed_official | 35:f72ccc6892ee | 80 | *******************************************************************************/ |
mbed_official | 35:f72ccc6892ee | 81 | /* ==== common ==== */ |
mbed_official | 35:f72ccc6892ee | 82 | void usb0_host_dma_stop_d0(uint16_t pipe, uint32_t remain); |
mbed_official | 35:f72ccc6892ee | 83 | void usb0_host_dma_stop_d1(uint16_t pipe, uint32_t remain); |
mbed_official | 35:f72ccc6892ee | 84 | uint16_t usb0_host_is_hispeed(void); |
mbed_official | 35:f72ccc6892ee | 85 | uint16_t usb0_host_is_hispeed_enable(void); |
mbed_official | 35:f72ccc6892ee | 86 | uint16_t usb0_host_start_send_transfer(uint16_t pipe, uint32_t size, uint8_t *data); |
mbed_official | 35:f72ccc6892ee | 87 | uint16_t usb0_host_write_buffer(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 88 | uint16_t usb0_host_write_buffer_c(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 89 | uint16_t usb0_host_write_buffer_d0(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 90 | uint16_t usb0_host_write_buffer_d1(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 91 | void usb0_host_start_receive_transfer(uint16_t pipe, uint32_t size, uint8_t *data); |
mbed_official | 35:f72ccc6892ee | 92 | uint16_t usb0_host_read_buffer(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 93 | uint16_t usb0_host_read_buffer_c(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 94 | uint16_t usb0_host_read_buffer_d0(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 95 | uint16_t usb0_host_read_buffer_d1(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 96 | uint16_t usb0_host_change_fifo_port(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw); |
mbed_official | 35:f72ccc6892ee | 97 | void usb0_host_set_curpipe(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw); |
mbed_official | 35:f72ccc6892ee | 98 | void usb0_host_set_curpipe2(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw, uint16_t dfacc); |
mbed_official | 35:f72ccc6892ee | 99 | uint16_t usb0_host_get_mbw(uint32_t trncount, uint32_t dtptr); |
mbed_official | 35:f72ccc6892ee | 100 | uint16_t usb0_host_read_dma(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 101 | void usb0_host_stop_transfer(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 102 | void usb0_host_brdy_int(uint16_t status, uint16_t int_enb); |
mbed_official | 35:f72ccc6892ee | 103 | void usb0_host_nrdy_int(uint16_t status, uint16_t int_enb); |
mbed_official | 35:f72ccc6892ee | 104 | void usb0_host_bemp_int(uint16_t status, uint16_t int_enb); |
mbed_official | 35:f72ccc6892ee | 105 | void usb0_host_setting_interrupt(uint8_t level); |
mbed_official | 35:f72ccc6892ee | 106 | void usb0_host_reset_module(uint16_t clockmode); |
mbed_official | 35:f72ccc6892ee | 107 | uint16_t usb0_host_get_buf_size(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 108 | uint16_t usb0_host_get_mxps(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 109 | void usb0_host_enable_brdy_int(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 110 | void usb0_host_disable_brdy_int(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 111 | void usb0_host_clear_brdy_sts(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 112 | void usb0_host_enable_bemp_int(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 113 | void usb0_host_disable_bemp_int(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 114 | void usb0_host_clear_bemp_sts(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 115 | void usb0_host_enable_nrdy_int(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 116 | void usb0_host_disable_nrdy_int(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 117 | void usb0_host_clear_nrdy_sts(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 118 | void usb0_host_set_pid_buf(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 119 | void usb0_host_set_pid_nak(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 120 | void usb0_host_set_pid_stall(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 121 | void usb0_host_clear_pid_stall(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 122 | uint16_t usb0_host_get_pid(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 123 | void usb0_host_set_sqclr(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 124 | void usb0_host_set_sqset(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 125 | void usb0_host_set_csclr(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 126 | void usb0_host_aclrm(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 127 | void usb0_host_set_aclrm(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 128 | void usb0_host_clr_aclrm(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 129 | uint16_t usb0_host_get_sqmon(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 130 | uint16_t usb0_host_get_inbuf(uint16_t pipe); |
mbed_official | 35:f72ccc6892ee | 131 | |
mbed_official | 35:f72ccc6892ee | 132 | /* ==== host ==== */ |
mbed_official | 35:f72ccc6892ee | 133 | void usb0_host_init_pipe_status(void); |
mbed_official | 35:f72ccc6892ee | 134 | int32_t usb0_host_CtrlTransStart(uint16_t devadr, uint16_t Req, uint16_t Val, uint16_t Indx, uint16_t Len, uint8_t *Buf); |
mbed_official | 35:f72ccc6892ee | 135 | void usb0_host_SetupStage(uint16_t Req, uint16_t Val, uint16_t Indx, uint16_t Len); |
mbed_official | 35:f72ccc6892ee | 136 | void usb0_host_CtrlReadStart(uint32_t Bsize, uint8_t *Table); |
mbed_official | 35:f72ccc6892ee | 137 | uint16_t usb0_host_CtrlWriteStart(uint32_t Bsize, uint8_t *Table); |
mbed_official | 35:f72ccc6892ee | 138 | void usb0_host_StatusStage(void); |
mbed_official | 35:f72ccc6892ee | 139 | void usb0_host_get_devadd(uint16_t addr, uint16_t *devadd); |
mbed_official | 35:f72ccc6892ee | 140 | void usb0_host_set_devadd(uint16_t addr, uint16_t *devadd); |
mbed_official | 35:f72ccc6892ee | 141 | void usb0_host_InitModule(void); |
mbed_official | 35:f72ccc6892ee | 142 | uint16_t usb0_host_CheckAttach(void); |
mbed_official | 35:f72ccc6892ee | 143 | void usb0_host_UsbDetach(void); |
mbed_official | 35:f72ccc6892ee | 144 | void usb0_host_UsbDetach2(void); |
mbed_official | 35:f72ccc6892ee | 145 | void usb0_host_UsbAttach(void); |
mbed_official | 35:f72ccc6892ee | 146 | uint16_t usb0_host_UsbBusReset(void); |
mbed_official | 35:f72ccc6892ee | 147 | int32_t usb0_host_UsbResume(void); |
mbed_official | 35:f72ccc6892ee | 148 | int32_t usb0_host_UsbSuspend(void); |
mbed_official | 35:f72ccc6892ee | 149 | void usb0_host_Enable_DetachINT(void); |
mbed_official | 35:f72ccc6892ee | 150 | void usb0_host_Disable_DetachINT(void); |
mbed_official | 35:f72ccc6892ee | 151 | void usb0_host_UsbStateManager(void); |
mbed_official | 35:f72ccc6892ee | 152 | |
mbed_official | 35:f72ccc6892ee | 153 | |
mbed_official | 35:f72ccc6892ee | 154 | #endif /* USB0_HOST_H */ |
mbed_official | 35:f72ccc6892ee | 155 | |
mbed_official | 35:f72ccc6892ee | 156 | /* End of File */ |