Added some error returns
[kugel-rb.git] / firmware / export / usb_drv.h
blobc503a846ed5098a01a8234d8462c1f5ef945e260
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: $
10 * Copyright (C) 2007 by Björn Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #ifndef ARCOTG_DRV_H
20 #define ARCOTG_DRV_H
21 #include "usb_ch9.h"
22 #include "kernel.h"
24 void usb_drv_init(void);
25 void usb_drv_exit(void);
26 void usb_drv_int(void);
27 void usb_drv_stall(int endpoint, bool stall);
28 int usb_drv_send(int endpoint, void* ptr, int length);
29 int usb_drv_recv(int endpoint, void* ptr, int length);
30 void usb_drv_ack(struct usb_ctrlrequest* req);
31 void usb_drv_set_address(int address);
32 void usb_drv_reset_endpoint(int endpoint, bool send);
33 void usb_drv_wait(int endpoint, bool send);
34 bool usb_drv_powered(void);
36 #endif