Update German translation
[maemo-rb.git] / firmware / export / usb_drv.h
blobc0b4d561f205fe47f59800e0fb31649c2ff01008
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Björn Stenberg
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #ifndef _USB_DRV_H
22 #define _USB_DRV_H
23 #include "usb_ch9.h"
24 #include "kernel.h"
26 void usb_drv_startup(void);
27 void usb_drv_usb_detect_event(void); /* Target implemented */
28 void usb_drv_int_enable(bool enable); /* Target implemented */
29 void usb_drv_init(void);
30 void usb_drv_exit(void);
31 void usb_drv_attach(void);
32 void usb_drv_int(void); /* Call from target INT handler */
33 void usb_drv_stall(int endpoint, bool stall,bool in);
34 bool usb_drv_stalled(int endpoint,bool in);
35 int usb_drv_send(int endpoint, void* ptr, int length);
36 int usb_drv_send_nonblocking(int endpoint, void* ptr, int length);
37 int usb_drv_recv(int endpoint, void* ptr, int length);
38 void usb_drv_ack(struct usb_ctrlrequest* req);
39 void usb_drv_set_address(int address);
40 void usb_drv_reset_endpoint(int endpoint, bool send);
41 bool usb_drv_powered(void);
42 int usb_drv_port_speed(void);
43 void usb_drv_cancel_all_transfers(void);
44 void usb_drv_set_test_mode(int mode);
45 bool usb_drv_connected(void);
46 int usb_drv_request_endpoint(int type, int dir);
47 void usb_drv_release_endpoint(int ep);
49 #endif /* _USB_DRV_H */