2018.07.26

Dependencies:   FATFileSystem3 mbed-rtos

Fork of USBHost by mbed official

Committer:
sayzyas
Date:
Thu Jul 26 00:20:32 2018 +0000
Revision:
43:1675750cca08
2018.07.26

Who changed what in which revision?

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