diff --git a/platform/stepper-robot/usb-msc/Makefile b/platform/stepper-robot/usb-msc/Makefile new file mode 100644 index 000000000..83ad96b17 --- /dev/null +++ b/platform/stepper-robot/usb-msc/Makefile @@ -0,0 +1,21 @@ +TARGET=stepper-robot + +all: usbmsctst + + +CONTIKI=../../.. + +CONTIKI_TARGET_MAIN=usb-main.c + +PROJECT_SOURCEFILES = + +USB_MASS_STORAGE_CLASS=1 + + +clean: stepper_robot_clean + +.PHONY: stepper_robot_clean + +stepper_robot_clean: + +include $(CONTIKI)/Makefile.include diff --git a/platform/stepper-robot/usb-msc/usbmsctst.c b/platform/stepper-robot/usb-msc/usbmsctst.c new file mode 100644 index 000000000..1746744ca --- /dev/null +++ b/platform/stepper-robot/usb-msc/usbmsctst.c @@ -0,0 +1,40 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +PROCESS(usb_masstest_process, "USB massstorage test process"); + +#if 0 +extern unsigned int idle_count; +#endif + +PROCESS_THREAD(usb_masstest_process, ev , data) +{ + static unsigned int last_count; + PROCESS_BEGIN(); + static struct etimer timer; + usb_msc_bulk_setup(); + etimer_set(&timer, CLOCK_SECOND); +#if 0 + last_count = idle_count; +#endif + while(1) { + PROCESS_WAIT_EVENT(); + if (ev == PROCESS_EVENT_TIMER) { +#if 0 + printf("Idle count: %d\n", idle_count - last_count); + last_count = idle_count; +#endif + etimer_reset(&timer); + } + } + PROCESS_END(); +} + + +AUTOSTART_PROCESSES(&usb_masstest_process);