Björn Stenberg | b4e5123 | 2007-11-22 20:51:00 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
Michael Sevakis | 3dcb4ff | 2008-04-18 17:24:19 +0000 | [diff] [blame] | 8 | * $Id$ |
Björn Stenberg | b4e5123 | 2007-11-22 20:51:00 +0000 | [diff] [blame] | 9 | * |
Nicolas Pennequin | 357ffb3 | 2008-05-05 10:32:46 +0000 | [diff] [blame] | 10 | * Copyright (C) 2007 by Björn Stenberg |
Björn Stenberg | b4e5123 | 2007-11-22 20:51:00 +0000 | [diff] [blame] | 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame^] | 12 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License |
| 14 | * as published by the Free Software Foundation; either version 2 |
| 15 | * of the License, or (at your option) any later version. |
Björn Stenberg | b4e5123 | 2007-11-22 20:51:00 +0000 | [diff] [blame] | 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
| 21 | #ifndef ARCOTG_DRV_H |
| 22 | #define ARCOTG_DRV_H |
| 23 | #include "usb_ch9.h" |
| 24 | #include "kernel.h" |
| 25 | |
Michael Sevakis | 9003dbe | 2008-04-20 03:30:57 +0000 | [diff] [blame] | 26 | void usb_drv_startup(void); |
Björn Stenberg | b4e5123 | 2007-11-22 20:51:00 +0000 | [diff] [blame] | 27 | void usb_drv_init(void); |
| 28 | void usb_drv_exit(void); |
| 29 | void usb_drv_int(void); |
Frank Gevaerts | 0742759 | 2008-02-20 22:54:26 +0000 | [diff] [blame] | 30 | void usb_drv_stall(int endpoint, bool stall,bool in); |
| 31 | bool usb_drv_stalled(int endpoint,bool in); |
Björn Stenberg | a022459 | 2007-11-27 13:42:47 +0000 | [diff] [blame] | 32 | int usb_drv_send(int endpoint, void* ptr, int length); |
Frank Gevaerts | 0742759 | 2008-02-20 22:54:26 +0000 | [diff] [blame] | 33 | int usb_drv_send_nonblocking(int endpoint, void* ptr, int length); |
Björn Stenberg | a022459 | 2007-11-27 13:42:47 +0000 | [diff] [blame] | 34 | int usb_drv_recv(int endpoint, void* ptr, int length); |
Björn Stenberg | b4e5123 | 2007-11-22 20:51:00 +0000 | [diff] [blame] | 35 | void usb_drv_ack(struct usb_ctrlrequest* req); |
| 36 | void usb_drv_set_address(int address); |
| 37 | void usb_drv_reset_endpoint(int endpoint, bool send); |
| 38 | void usb_drv_wait(int endpoint, bool send); |
Björn Stenberg | 7af22e1 | 2007-11-22 22:17:45 +0000 | [diff] [blame] | 39 | bool usb_drv_powered(void); |
Björn Stenberg | 2f7cffa | 2008-02-11 14:26:25 +0000 | [diff] [blame] | 40 | int usb_drv_port_speed(void); |
Frank Gevaerts | 0742759 | 2008-02-20 22:54:26 +0000 | [diff] [blame] | 41 | void usb_drv_cancel_all_transfers(void); |
Frank Gevaerts | 97d7f39 | 2008-02-26 18:02:26 +0000 | [diff] [blame] | 42 | void usb_drv_set_test_mode(int mode); |
Frank Gevaerts | a6108b9 | 2008-03-20 20:01:28 +0000 | [diff] [blame] | 43 | bool usb_drv_connected(void); |
Björn Stenberg | b4e5123 | 2007-11-22 20:51:00 +0000 | [diff] [blame] | 44 | |
| 45 | #endif |