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.

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?

UserRevisionLine numberNew 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) 2014 - 2015 Renesas Electronics Corporation. All rights reserved.
Kojto 39:d96aa62afc5b 22 *******************************************************************************/
Kojto 39:d96aa62afc5b 23
Kojto 39:d96aa62afc5b 24 #ifndef USB_HOST_SETTING_H
Kojto 39:d96aa62afc5b 25 #define USB_HOST_SETTING_H
Kojto 39:d96aa62afc5b 26
Kojto 39:d96aa62afc5b 27 #ifdef __cplusplus
Kojto 39:d96aa62afc5b 28 extern "C" {
Kojto 39:d96aa62afc5b 29 #endif
Kojto 39:d96aa62afc5b 30
Kojto 39:d96aa62afc5b 31 #define USB_HOST_CH 0
Kojto 39:d96aa62afc5b 32 #define USB_HOST_HISPEED 1
Kojto 39:d96aa62afc5b 33
Kojto 39:d96aa62afc5b 34 #define INT_TRANS_MAX_NUM 4 /* min:1 max:4 */
Kojto 39:d96aa62afc5b 35 #define ISO_TRANS_MAX_NUM 0 /* min:0 max:2 */
Kojto 39:d96aa62afc5b 36
Kojto 39:d96aa62afc5b 37 #if (USB_HOST_CH == 0)
Kojto 39:d96aa62afc5b 38 #include "usb0_host.h"
Kojto 39:d96aa62afc5b 39 #define USB20X USB200
Kojto 39:d96aa62afc5b 40 #define USBIXUSBIX USBI0_IRQn
Kojto 39:d96aa62afc5b 41 #define g_usbx_host_SupportUsbDeviceSpeed g_usb0_host_SupportUsbDeviceSpeed
Kojto 39:d96aa62afc5b 42 #define g_usbx_host_UsbDeviceSpeed g_usb0_host_UsbDeviceSpeed
Kojto 39:d96aa62afc5b 43 #define g_usbx_host_CmdStage g_usb0_host_CmdStage
Kojto 39:d96aa62afc5b 44 #define g_usbx_host_pipe_status g_usb0_host_pipe_status
Kojto 39:d96aa62afc5b 45 #define g_usbx_host_data_pointer g_usb0_host_data_pointer
Kojto 39:d96aa62afc5b 46 #define g_usbx_host_data_count g_usb0_host_data_count
Kojto 39:d96aa62afc5b 47 #define usbx_api_host_init usb0_api_host_init
Kojto 39:d96aa62afc5b 48 #define usbx_host_UsbBusReset usb0_host_UsbBusReset
Kojto 39:d96aa62afc5b 49 #define usbx_host_get_devadd usb0_host_get_devadd
Kojto 39:d96aa62afc5b 50 #define usbx_host_set_devadd usb0_host_set_devadd
Kojto 39:d96aa62afc5b 51 #define usbx_host_SetupStage usb0_host_SetupStage
Kojto 39:d96aa62afc5b 52 #define usbx_host_CtrlWriteStart usb0_host_CtrlWriteStart
Kojto 39:d96aa62afc5b 53 #define usbx_host_CtrlReadStart usb0_host_CtrlReadStart
Kojto 39:d96aa62afc5b 54 #define usbx_api_host_SetEndpointTable usb0_api_host_SetEndpointTable
Kojto 39:d96aa62afc5b 55 #define usbx_host_start_send_transfer usb0_host_start_send_transfer
Kojto 39:d96aa62afc5b 56 #define usbx_host_start_receive_transfer usb0_host_start_receive_transfer
Kojto 39:d96aa62afc5b 57 #define usbx_host_stop_transfer usb0_host_stop_transfer
Kojto 39:d96aa62afc5b 58 #define usbx_host_set_sqclr usb0_host_set_sqclr
Kojto 39:d96aa62afc5b 59 #define usbx_host_set_sqset usb0_host_set_sqset
Kojto 39:d96aa62afc5b 60 #define usbx_host_CheckAttach usb0_host_CheckAttach
Kojto 39:d96aa62afc5b 61 #define usbx_host_UsbDetach usb0_host_UsbDetach
Kojto 39:d96aa62afc5b 62 #define usbx_host_UsbAttach usb0_host_UsbAttach
Kojto 39:d96aa62afc5b 63 #define usbx_host_init_pipe_status usb0_host_init_pipe_status
Kojto 39:d96aa62afc5b 64 #define usbx_host_get_sqmon usb0_host_get_sqmon
Kojto 39:d96aa62afc5b 65 #else
Kojto 39:d96aa62afc5b 66 #include "usb1_host.h"
Kojto 39:d96aa62afc5b 67 #define USB20X USB201
Kojto 39:d96aa62afc5b 68 #define USBIXUSBIX USBI1_IRQn
Kojto 39:d96aa62afc5b 69 #define g_usbx_host_SupportUsbDeviceSpeed g_usb1_host_SupportUsbDeviceSpeed
Kojto 39:d96aa62afc5b 70 #define g_usbx_host_UsbDeviceSpeed g_usb1_host_UsbDeviceSpeed
Kojto 39:d96aa62afc5b 71 #define g_usbx_host_CmdStage g_usb1_host_CmdStage
Kojto 39:d96aa62afc5b 72 #define g_usbx_host_pipe_status g_usb1_host_pipe_status
Kojto 39:d96aa62afc5b 73 #define g_usbx_host_data_pointer g_usb1_host_data_pointer
Kojto 39:d96aa62afc5b 74 #define g_usbx_host_data_count g_usb1_host_data_count
Kojto 39:d96aa62afc5b 75 #define usbx_api_host_init usb1_api_host_init
Kojto 39:d96aa62afc5b 76 #define usbx_host_UsbBusReset usb1_host_UsbBusReset
Kojto 39:d96aa62afc5b 77 #define usbx_host_get_devadd usb1_host_get_devadd
Kojto 39:d96aa62afc5b 78 #define usbx_host_set_devadd usb1_host_set_devadd
Kojto 39:d96aa62afc5b 79 #define usbx_host_SetupStage usb1_host_SetupStage
Kojto 39:d96aa62afc5b 80 #define usbx_host_CtrlWriteStart usb1_host_CtrlWriteStart
Kojto 39:d96aa62afc5b 81 #define usbx_host_CtrlReadStart usb1_host_CtrlReadStart
Kojto 39:d96aa62afc5b 82 #define usbx_api_host_SetEndpointTable usb1_api_host_SetEndpointTable
Kojto 39:d96aa62afc5b 83 #define usbx_host_start_send_transfer usb1_host_start_send_transfer
Kojto 39:d96aa62afc5b 84 #define usbx_host_start_receive_transfer usb1_host_start_receive_transfer
Kojto 39:d96aa62afc5b 85 #define usbx_host_stop_transfer usb1_host_stop_transfer
Kojto 39:d96aa62afc5b 86 #define usbx_host_set_sqclr usb1_host_set_sqclr
Kojto 39:d96aa62afc5b 87 #define usbx_host_set_sqset usb1_host_set_sqset
Kojto 39:d96aa62afc5b 88 #define usbx_host_CheckAttach usb1_host_CheckAttach
Kojto 39:d96aa62afc5b 89 #define usbx_host_UsbDetach usb1_host_UsbDetach
Kojto 39:d96aa62afc5b 90 #define usbx_host_UsbAttach usb1_host_UsbAttach
Kojto 39:d96aa62afc5b 91 #define usbx_host_init_pipe_status usb1_host_init_pipe_status
Kojto 39:d96aa62afc5b 92 #define usbx_host_get_sqmon usb1_host_get_sqmon
Kojto 39:d96aa62afc5b 93 #endif
Kojto 39:d96aa62afc5b 94
Kojto 39:d96aa62afc5b 95
Kojto 39:d96aa62afc5b 96 #ifdef __cplusplus
Kojto 39:d96aa62afc5b 97 }
Kojto 39:d96aa62afc5b 98 #endif
Kojto 39:d96aa62afc5b 99
Kojto 39:d96aa62afc5b 100 #endif /* USB_HOST_SETTING_H */