Simple USBHost library for STM32F746NG Discovery board. Only either the Fastspeed or the Highspeed port can be used( not both together)

Dependents:   DISCO-F746NG_USB_Host

Fork of KL46Z-USBHost by Norimasa Okamoto

Committer:
DieterGraef
Date:
Mon Jun 13 17:21:07 2016 +0000
Revision:
24:5396b6a93262
USB Host for STM32F746 DISCO Board. At the moment you can only use either the High Speed Port or the Fast Speed Port.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DieterGraef 24:5396b6a93262 1 /* mbed Microcontroller Library
DieterGraef 24:5396b6a93262 2 * Copyright (c) 2006-2012 ARM Limited
DieterGraef 24:5396b6a93262 3 *
DieterGraef 24:5396b6a93262 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
DieterGraef 24:5396b6a93262 5 * of this software and associated documentation files (the "Software"), to deal
DieterGraef 24:5396b6a93262 6 * in the Software without restriction, including without limitation the rights
DieterGraef 24:5396b6a93262 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
DieterGraef 24:5396b6a93262 8 * copies of the Software, and to permit persons to whom the Software is
DieterGraef 24:5396b6a93262 9 * furnished to do so, subject to the following conditions:
DieterGraef 24:5396b6a93262 10 *
DieterGraef 24:5396b6a93262 11 * The above copyright notice and this permission notice shall be included in
DieterGraef 24:5396b6a93262 12 * all copies or substantial portions of the Software.
DieterGraef 24:5396b6a93262 13 *
DieterGraef 24:5396b6a93262 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
DieterGraef 24:5396b6a93262 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
DieterGraef 24:5396b6a93262 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
DieterGraef 24:5396b6a93262 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
DieterGraef 24:5396b6a93262 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
DieterGraef 24:5396b6a93262 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
DieterGraef 24:5396b6a93262 20 * SOFTWARE.
DieterGraef 24:5396b6a93262 21 */
DieterGraef 24:5396b6a93262 22 #ifndef MBED_FATFILEHANDLE_H
DieterGraef 24:5396b6a93262 23 #define MBED_FATFILEHANDLE_H
DieterGraef 24:5396b6a93262 24
DieterGraef 24:5396b6a93262 25 #include "FileHandle.h"
DieterGraef 24:5396b6a93262 26
DieterGraef 24:5396b6a93262 27 using namespace mbed;
DieterGraef 24:5396b6a93262 28
DieterGraef 24:5396b6a93262 29 class FATFileHandle : public FileHandle {
DieterGraef 24:5396b6a93262 30 public:
DieterGraef 24:5396b6a93262 31
DieterGraef 24:5396b6a93262 32 FATFileHandle(FIL fh);
DieterGraef 24:5396b6a93262 33 virtual int close();
DieterGraef 24:5396b6a93262 34 virtual ssize_t write(const void* buffer, size_t length);
DieterGraef 24:5396b6a93262 35 virtual ssize_t read(void* buffer, size_t length);
DieterGraef 24:5396b6a93262 36 virtual int isatty();
DieterGraef 24:5396b6a93262 37 virtual off_t lseek(off_t position, int whence);
DieterGraef 24:5396b6a93262 38 virtual int fsync();
DieterGraef 24:5396b6a93262 39 virtual off_t flen();
DieterGraef 24:5396b6a93262 40
DieterGraef 24:5396b6a93262 41 protected:
DieterGraef 24:5396b6a93262 42
DieterGraef 24:5396b6a93262 43 FIL _fh;
DieterGraef 24:5396b6a93262 44
DieterGraef 24:5396b6a93262 45 };
DieterGraef 24:5396b6a93262 46
DieterGraef 24:5396b6a93262 47 #endif