Clean up Makefile leftovers (dhewg)
[libogc.git] / gc / wiikeyboard / usbkeyboard.h
bloba5da919a18d9fcc06d346c71c9f111c70d0c0108
1 /*-------------------------------------------------------------
3 usbkeyboard.h -- Usb keyboard support(boot protocol)
5 Copyright (C) 2008, 2009
6 DAVY Guillaume davyg2@gmail.com
7 dhewg
9 This software is provided 'as-is', without any express or implied
10 warranty. In no event will the authors be held liable for any
11 damages arising from the use of this software.
13 Permission is granted to anyone to use this software for any
14 purpose, including commercial applications, and to alter it and
15 redistribute it freely, subject to the following restrictions:
17 1. The origin of this software must not be misrepresented; you
18 must not claim that you wrote the original software. If you use
19 this software in a product, an acknowledgment in the product
20 documentation would be appreciated but is not required.
22 2. Altered source versions must be plainly marked as such, and
23 must not be misrepresented as being the original software.
25 3. This notice may not be removed or altered from any source
26 distribution.
28 -------------------------------------------------------------*/
30 #ifndef __USBKEYBOARD_H__
31 #define __USBKEYBOARD_H__
33 #ifdef __cplusplus
34 extern "C" {
35 #endif /* __cplusplus */
37 typedef enum
39 USBKEYBOARD_PRESSED = 0,
40 USBKEYBOARD_RELEASED,
41 USBKEYBOARD_DISCONNECTED
42 } USBKeyboard_eventType;
44 typedef enum
46 USBKEYBOARD_LEDNUM = 0,
47 USBKEYBOARD_LEDCAPS,
48 USBKEYBOARD_LEDSCROLL
49 } USBKeyboard_led;
51 typedef struct
53 USBKeyboard_eventType type;
54 u8 keyCode;
55 } USBKeyboard_event;
57 typedef void (*eventcallback) (USBKeyboard_event event);
59 s32 USBKeyboard_Initialize(void);
60 s32 USBKeyboard_Deinitialize(void);
62 s32 USBKeyboard_Open(const eventcallback cb);
63 void USBKeyboard_Close(void);
65 bool USBKeyboard_IsConnected(void);
66 s32 USBKeyboard_Scan(void);
68 s32 USBKeyboard_SetLed(const USBKeyboard_led led, bool on);
69 s32 USBKeyboard_ToggleLed(const USBKeyboard_led led);
71 #ifdef __cplusplus
73 #endif /* __cplusplus */
75 #endif /* __USBKEYBOARD_H__ */