Do some #ifdef'ing to make the Player happy.
[kugel-rb.git] / firmware / export / usb_drv.h
blobfad9c79c10cb4aeae91cace3308d412d8780a1f5
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_reset(void);
30 void usb_drv_init(void);
31 void usb_drv_exit(void);
32 void usb_drv_attach(void);
33 void usb_drv_int(void); /* Call from target INT handler */
34 void usb_drv_stall(int endpoint, bool stall,bool in);
35 bool usb_drv_stalled(int endpoint,bool in);
36 int usb_drv_send(int endpoint, void* ptr, int length);
37 int usb_drv_send_nonblocking(int endpoint, void* ptr, int length);
38 int usb_drv_recv(int endpoint, void* ptr, int length);
39 void usb_drv_ack(struct usb_ctrlrequest* req);
40 void usb_drv_set_address(int address);
41 void usb_drv_reset_endpoint(int endpoint, bool send);
42 bool usb_drv_powered(void);
43 int usb_drv_port_speed(void);
44 void usb_drv_cancel_all_transfers(void);
45 void usb_drv_set_test_mode(int mode);
46 bool usb_drv_connected(void);
47 int usb_drv_request_endpoint(int type, int dir);
48 void usb_drv_release_endpoint(int ep);
50 #endif /* _USB_DRV_H */