1 /* lv2.h - Lv-2 defines, thunks, and functions
3 Copyright (C) 2010-2011 Hector Martin "marcan" <hector@marcansoft.com>
5 This code is licensed to you under the terms of the GNU GPL, version 2;
6 see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
14 typedef unsigned char u8
;
15 typedef unsigned short u16
;
16 typedef unsigned int u32
;
17 typedef unsigned long u64
;
19 typedef signed char s8
;
20 typedef signed short s16
;
21 typedef signed int s32
;
22 typedef signed long s64
;
24 #define CBTHUNK(ret, name, args) asm("" \
25 " .section \".text\"\n" \
29 " .section \".opd\",\"aw\"\n" \
32 " .quad .L."#name",.TOC.@tocbase\n" \
34 " .type "#name", @function\n" \
39 " clrrdi 2, 2, 32\n" \
40 " oris 2, 2, __toc@h\n" \
41 " ori 2, 2, __toc@l\n" \
47 " .size "#name",.-.L."#name"\n"); \
53 int (*probe_func
)(int device_id
);
54 int (*attach_func
)(int device_id
);
55 int (*detach_func
)(int device_id
);
72 void *usbGetDescriptor(int device_id
, void *start
, u8 type
);
73 int usbOpenEndpoint(int device_id
, void *epdesc
);
74 int usbControlTransfer(int pipe_id
, control_transfer_t
*request
, void *data
, void *cb
, void *cbarg
);
75 int printf(const char *fmt
, ...);