Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: F401RE-USBHostMIDI_RecieveExample
Fork of F401RE-USBHost by
USBHost.h
- Committer:
- va009039
- Date:
- 2014-01-23
- Revision:
- 2:0cdac6bcc534
- Parent:
- 1:c072d9e580b0
File content as of revision 2:0cdac6bcc534:
// Simple USBHost for FRDM-KL46Z
#pragma once
#include "mbed.h"
#include "USBHALHost.h"
class USBHost : public USBHALHost {
public:
static USBHost* getHostInst();
int InterruptRead(uint8_t* data, int size);
int ControlRead(SETUP_PACKET* setup, uint8_t* data, int size);
int ControlWrite(SETUP_PACKET* setup, uint8_t* data = NULL, int size = 0);
int BulkRead(uint8_t* data, int size);
int BulkWrite(const uint8_t* data, int size);
private:
USBHost();
static USBHost* inst;
virtual bool enumeration();
int dev_addr;
};
