Usb Device Interface, protocol, and programming homework #4 Audio Control device

Dependencies:   C12832_lcd USBDevice mbed

USBAudioControl.h

Committer:
jakowisp
Date:
2013-07-30
Revision:
0:69eb9d19fb91
Child:
1:948ffad3284f

File content as of revision 0:69eb9d19fb91:

#ifndef USBaudiocontrol_H
#define USBaudiocontrol_H

#include "USBHID.h"


/* Common usage */

/**
 *
 * @endcode
 */

class USBAudioControl: public USBHID
{
    public:
        
        /**
        *   Constructor
        *
        * @param vendor_id Your vendor_id (default: 0x1234)
        * @param product_id Your product_id (default: 0x0001)
        * @param product_release Your preoduct_release (default: 0x0001)
        *
        */
        USBAudioControl( uint16_t vendor_id = 0x1234, uint16_t product_id = 0x0006, uint16_t product_release = 0x0001): 
            USBHID(1, 1, 1, vendor_id, product_id, product_release, false)
            {        
                callbackSuspendChange=NULL;
            };
        
        
        /*
        * To define the report descriptor. Warning: this method has to store the length of the report descriptor in reportLength.
        *
        * @returns pointer to the report descriptor
        */
        virtual uint8_t * reportDesc();
        
        unsigned int getConnectState();
        void (*callbackSuspendChange)(unsigned int connected);
        virtual void suspendStateChanged(unsigned int suspend);

};

#endif