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
USBHost/USBEndpoint.h
- Committer:
- va009039
- Date:
- 2014-01-27
- Revision:
- 5:10bfc10afcc8
- Child:
- 8:6463cd1964c0
File content as of revision 5:10bfc10afcc8:
#pragma once #include "USBHostTypes.h" class USBEndpoint { public: USBEndpoint() : data01_toggle(DATA0),address(0),MaxPacketSize(8) {} void setState(uint8_t st){}; // dummy void setSize(int size) { MaxPacketSize = size; } void setAddress(uint8_t addr) { address = addr; } void setData01(uint8_t data01) { data01_toggle = data01; } uint8_t getAddress(){ return address; }; int getSize() { return MaxPacketSize; } uint8_t getData01() { return data01_toggle; } void toggleData01() { data01_toggle = (data01_toggle == DATA0) ? DATA1 : DATA0; } private: uint8_t data01_toggle; // DATA0,DATA1 uint8_t address; int MaxPacketSize; };