#include "irq.h"
#include "usb/core/core.h"
#include "usb/drivers/class/hid.h"
+#include "sha1.h"
#include "hollywood.h"
#define MINIMUM_MINI_VERSION 0x00010001
usb_init(OHCI0_REG_BASE);
/* internal ohci */
- //usb_init(OHCI1_REG_BASE);
+ usb_init(OHCI1_REG_BASE);
/* load HID keyboard driver */
usb_hidkb_init();
+ /* wait for usb keyboard plugged in */
+ if(!usb_hidkb_inuse()) {
+ print_str("plug in an usb keyboard", 23);
+ }
+ while(!usb_hidkb_inuse());
+
/* you are welcome to make this nice :) */
char str[7];
u16 i, j, y=20, x=20;
y=20;
}
if((k->keys[i] >= 4) && k->keys[i] <= 4+'z'-'a') {
- str[j] = k->keys[i] - 4 + 'a';
- }
+ str[j] = k->keys[i] - 4 + (k->mod & MOD_lshift || k->mod & MOD_rshift ? 'A' : 'a');
+ } else if ((k->keys[i] >= 0x1e) && (k->keys[i] <= 0x26)) {
+ str[j] = k->keys[i] - 0x1e + '1';
+ } else if (k->keys[i] == 0x27) {
+ str[j] = '0';
+ }
else if (k->keys[i] == 0x28) {
y += 15;
x = 20;
}
}
+#if 0
+ printf("===============================\n");
+
+ SHA1TestCases();
+
+ printf("bye, world!\n");
+#endif
+
return 0;
}