2007-08-27 16:04:32 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
2008-04-18 17:24:19 +00:00
|
|
|
* $Id$
|
2007-08-27 16:04:32 +00:00
|
|
|
*
|
2008-05-05 10:32:46 +00:00
|
|
|
* Copyright (C) 2007 by Björn Stenberg
|
2007-08-27 16:04:32 +00:00
|
|
|
*
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
2007-11-22 20:51:00 +00:00
|
|
|
#ifndef ARCOTG_DRV_H
|
|
|
|
#define ARCOTG_DRV_H
|
|
|
|
#include "usb_ch9.h"
|
|
|
|
#include "kernel.h"
|
2007-08-27 16:04:32 +00:00
|
|
|
|
2008-04-20 03:30:57 +00:00
|
|
|
void usb_drv_startup(void);
|
2007-11-22 20:51:00 +00:00
|
|
|
void usb_drv_init(void);
|
|
|
|
void usb_drv_exit(void);
|
|
|
|
void usb_drv_int(void);
|
2008-02-20 22:54:26 +00:00
|
|
|
void usb_drv_stall(int endpoint, bool stall,bool in);
|
|
|
|
bool usb_drv_stalled(int endpoint,bool in);
|
2007-11-27 13:42:47 +00:00
|
|
|
int usb_drv_send(int endpoint, void* ptr, int length);
|
2008-02-20 22:54:26 +00:00
|
|
|
int usb_drv_send_nonblocking(int endpoint, void* ptr, int length);
|
2007-11-27 13:42:47 +00:00
|
|
|
int usb_drv_recv(int endpoint, void* ptr, int length);
|
2007-11-22 20:51:00 +00:00
|
|
|
void usb_drv_ack(struct usb_ctrlrequest* req);
|
|
|
|
void usb_drv_set_address(int address);
|
|
|
|
void usb_drv_reset_endpoint(int endpoint, bool send);
|
|
|
|
void usb_drv_wait(int endpoint, bool send);
|
2007-11-22 22:17:45 +00:00
|
|
|
bool usb_drv_powered(void);
|
2008-02-11 14:26:25 +00:00
|
|
|
int usb_drv_port_speed(void);
|
2008-02-20 22:54:26 +00:00
|
|
|
void usb_drv_cancel_all_transfers(void);
|
2008-02-26 18:02:26 +00:00
|
|
|
void usb_drv_set_test_mode(int mode);
|
2008-03-20 20:01:28 +00:00
|
|
|
bool usb_drv_connected(void);
|
2007-08-27 16:04:32 +00:00
|
|
|
|
2007-11-22 20:51:00 +00:00
|
|
|
#endif
|