USBMSD test for GR-PEACH
Dependencies: USBDevice USBMSD_SD mbed
Fork of USBMSD_SD_HelloWorld_Mbed by
Diff: USBDevice/USBSERIAL/USBCDC.h
- Revision:
- 7:6494da2a5c60
- Parent:
- 6:126c4d980196
- Child:
- 8:534fd41d8cc7
--- a/USBDevice/USBSERIAL/USBCDC.h Mon Nov 14 10:00:07 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* USBCDC.h */ -/* CDC class */ -/* Copyright (c) 2011 ARM Limited. All rights reserved. */ - -#ifndef USBCDC_H -#define USBCDC_H - -/* These headers are included for child class. */ -#include "USBEndpoints.h" -#include "USBDescriptor.h" -#include "USBDevice_Types.h" - -#include "USBDevice.h" - - - -class USBCDC: public USBDevice { -public: - - /* - * Constructor - * - * @param vendor_id Your vendor_id - * @param product_id Your product_id - * @param product_release Your preoduct_release - */ - USBCDC(uint16_t vendor_id, uint16_t product_id, uint16_t product_release); - - - /* - * Get device descriptor. Warning: this method has to store the length of the report descriptor in reportLength. - * - * @returns pointer to the device descriptor - */ - virtual uint8_t * deviceDesc(); - - /* - * Get string product descriptor - * - * @returns pointer to the string product descriptor - */ - virtual uint8_t * stringIproductDesc(); - - /* - * Get string interface descriptor - * - * @returns pointer to the string interface descriptor - */ - virtual uint8_t * stringIinterfaceDesc(); - - /* - * Get configuration descriptor - * - * @returns pointer to the configuration descriptor - */ - virtual uint8_t * configurationDesc(); - - /* - * Send a buffer to a certain endpoint - * - * @param endpoint endpoint which will be sent the buffer - * @param buffer buffer to be sent - * @param size length of the buffer - * @returns true if successful - */ - bool send(uint8_t endpoint, uint8_t * buffer, uint16_t size); - - /* - * Read a buffer from a certain endpoint. Warning: blocking - * - * @param endpoint endpoint to read - * @param buffer buffer where will be stored bytes - * @param size the number of bytes read will be stored in *size - * @param maxSize the maximum length that can be read - * @returns true if successful - */ - bool read(uint8_t endpoint, uint8_t * buffer, uint16_t * size, uint16_t maxSize); - - /* - * Read a buffer from a certain endpoint. Warning: non blocking - * - * @param endpoint endpoint to read - * @param buffer buffer where will be stored bytes - * @param size the number of bytes read will be stored in *size - * @param maxSize the maximum length that can be read - * @returns true if successful - */ - bool readNB(uint8_t endpoint, uint8_t * buffer, uint16_t * size, uint16_t maxSize); - - virtual bool USBCallback_request(); - virtual bool USBCallback_setConfiguration(uint8_t configuration); - -}; - -#endif