2018.07.26

Dependencies:   FATFileSystem2 mbed-rtos

Fork of USBHost by mbed official

Committer:
sayzyas
Date:
Thu Jul 26 00:29:30 2018 +0000
Revision:
44:e437b1c7c61e
Parent:
43:78f328f311dc
2018.07.26

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sayzyas 43:78f328f311dc 1 /* mbed USBHost Library
sayzyas 43:78f328f311dc 2 * Copyright (c) 2006-2013 ARM Limited
sayzyas 43:78f328f311dc 3 *
sayzyas 43:78f328f311dc 4 * Licensed under the Apache License, Version 2.0 (the "License");
sayzyas 43:78f328f311dc 5 * you may not use this file except in compliance with the License.
sayzyas 43:78f328f311dc 6 * You may obtain a copy of the License at
sayzyas 43:78f328f311dc 7 *
sayzyas 43:78f328f311dc 8 * http://www.apache.org/licenses/LICENSE-2.0
sayzyas 43:78f328f311dc 9 *
sayzyas 43:78f328f311dc 10 * Unless required by applicable law or agreed to in writing, software
sayzyas 43:78f328f311dc 11 * distributed under the License is distributed on an "AS IS" BASIS,
sayzyas 43:78f328f311dc 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
sayzyas 43:78f328f311dc 13 * See the License for the specific language governing permissions and
sayzyas 43:78f328f311dc 14 * limitations under the License.
sayzyas 43:78f328f311dc 15 */
sayzyas 43:78f328f311dc 16
sayzyas 43:78f328f311dc 17 #ifndef IUSBENUMERATOR_H_
sayzyas 43:78f328f311dc 18 #define IUSBENUMERATOR_H_
sayzyas 43:78f328f311dc 19
sayzyas 43:78f328f311dc 20 #include "stdint.h"
sayzyas 43:78f328f311dc 21 #include "USBEndpoint.h"
sayzyas 43:78f328f311dc 22
sayzyas 43:78f328f311dc 23 /*
sayzyas 43:78f328f311dc 24 Generic interface to implement for "smart" USB enumeration
sayzyas 43:78f328f311dc 25 */
sayzyas 43:78f328f311dc 26
sayzyas 43:78f328f311dc 27 class IUSBEnumerator
sayzyas 43:78f328f311dc 28 {
sayzyas 43:78f328f311dc 29 public:
sayzyas 43:78f328f311dc 30 virtual void setVidPid(uint16_t vid, uint16_t pid) = 0;
sayzyas 43:78f328f311dc 31 virtual bool parseInterface(uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol) = 0; //Must return true if the interface should be parsed
sayzyas 43:78f328f311dc 32 virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir) = 0; //Must return true if the endpoint will be used
sayzyas 43:78f328f311dc 33 };
sayzyas 43:78f328f311dc 34
sayzyas 43:78f328f311dc 35 #endif /*IUSBENUMERATOR_H_*/
sayzyas 43:78f328f311dc 36