Satellite Observers Workbench. NOT yet complete, just published for forum posters to \"cherry pick\" pieces of code as requiered as an example.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers usbeh_device.h Source File

usbeh_device.h

00001 /****************************************************************************
00002  *    Copyright 2010 Andy Kirkham, Stellar Technologies Ltd
00003  *    
00004  *    This file is part of the Satellite Observers Workbench (SOWB).
00005  *
00006  *    SOWB is free software: you can redistribute it and/or modify
00007  *    it under the terms of the GNU General Public License as published by
00008  *    the Free Software Foundation, either version 3 of the License, or
00009  *    (at your option) any later version.
00010  *
00011  *    SOWB is distributed in the hope that it will be useful,
00012  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *    GNU General Public License for more details.
00015  *
00016  *    You should have received a copy of the GNU General Public License
00017  *    along with SOWB.  If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  *    $Id: main.cpp 5 2010-07-12 20:51:11Z ajk $
00020  *    
00021  ***************************************************************************/
00022  
00023 #ifndef USBEH_DEVICE_H
00024 #define USBEH_DEVICE_H
00025 
00026 #ifndef USBEH_H
00027 #include "usbeh.h"
00028 #endif
00029 
00030 class USBEH_Device {
00031 
00032     public:
00033     
00034     USBEH_U08   endpoints[16 * 2];
00035     USBEH_U08   hub;
00036     USBEH_U08   port;
00037     USBEH_U08   addr;
00038     USBEH_U08   pad;
00039     
00040     USBEH_U08   hubPortCount;
00041     USBEH_U08   hubInterruptData;
00042     USBEH_U08   hubMap;
00043     USBEH_U08   hubMask;
00044     
00045     int         flags;
00046     USBEH_Setup setupBuffer;
00047     
00048     // Member functions.
00049     int init(USBEH_deviceDescriptor *d, int hub, int port, int addr, int lowSpeed);
00050     int setEndpointIndex (int endpoint, int endpointIndex);
00051     int getEndpointIndex (int endpoint);
00052     
00053 };
00054 
00055 
00056 // END #ifndef USBEH_DEVICE_H
00057 #endif