diff --git a/tool/Makefile.mingw b/tool/Makefile.mingw index 594f3b3..1aedd31 100644 --- a/tool/Makefile.mingw +++ b/tool/Makefile.mingw @@ -6,9 +6,9 @@ LDFLAGS=-lsetupapi PREFIX=/usr/local -PROG=wusbmote_ctl +PROG=gcn64ctl -OBJS=main.o wusbmote.o hid.o +OBJS=main.o gcn64.o mempak.o gcn64lib.o hexdump.o gc2n64_adapter.o ihex.o delay.o hid.o sleep.o memmem.o .PHONY : clean install diff --git a/tool/memmem.c b/tool/memmem.c new file mode 100644 index 0000000..b7fae87 --- /dev/null +++ b/tool/memmem.c @@ -0,0 +1,15 @@ +#include + +void *memmem(const void *haystack, size_t haystack_len, + const void *needle, size_t needle_len) +{ + int i; + if (needle_len > haystack_len) + return NULL; + + for (i=0; i + +void sleep(int s) +{ + Sleep(s*1000); +} diff --git a/tool/sleep.h b/tool/sleep.h new file mode 100644 index 0000000..fdc4745 --- /dev/null +++ b/tool/sleep.h @@ -0,0 +1,6 @@ +#ifndef _sleep_h__ +#define _sleep_h__ + +void sleep(int s); + +#endif // _sleep_h__