##// END OF EJS Templates
Huge cleanup, removed old unmaintained boards/libs/archs....
Huge cleanup, removed old unmaintained boards/libs/archs. Changed from building once the lib in small archives to whole rebuilding from sources for each executable, this will allow to use build-time switchs/optimisations. /!\ Simulator broken.

File last commit:

r96:f72c1c144c9e dev_alexis
r105:031afdd64272 tip dev_alexis
Show More
usbdev.h
47 lines | 1.7 KiB | text/x-c | CLexer
Sync
r96 /*------------------------------------------------------------------------------
-- This file is a part of the libuc, microcontroler library
-- Copyright (C) 2014, Alexis Jeandet
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------------
-- Author : Alexis Jeandet
-- Mail : alexis.jeandet@member.fsf.org
-------------------------------------------------------------------------------*/
#include <uhandle.h>
#define USB_LowSpeed 1
#define USB_FullSpeed 2
#define USB_HighSpeed 3
#define USB_MODE_RAW 1
#define USB_MODE_VCP 2
#define USB_MODE_HID 3
#define USB_MODE_MSC 4
#define USB_MODE_AUDIO 5
struct usbdev_str
{
UHANDLE phy;
int (*epread) (UHANDLE phy,char *buff,uint32_t bc,char ep);
int (*epwrite) (UHANDLE phy,char *buff,uint32_t bc,char ep);
};
typedef volatile struct usbdev_str usbDev;
extern int usbdevopen(usbDev*dev, uint32_t DATAPpin,uint32_t DATAMpin,uint32_t VBUSpin,uint32_t IDpin,int USBSpeed,int usbmode);