usb dont spawn worker process, because only one USB controller is supported
This commit is contained in:
23
usb/usb.c
23
usb/usb.c
@@ -8,17 +8,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <system.h>
|
#include <system.h>
|
||||||
|
|
||||||
static void usb_poll_driver_proc (void* arg) {
|
static void usb_poll_driver_proc (void* arg) { struct device_info* info = arg; }
|
||||||
struct device_info* info = arg;
|
|
||||||
|
|
||||||
mprintf ("Polling device %s\n", info->key);
|
|
||||||
|
|
||||||
for (;;) {
|
|
||||||
device_do (info->key, XUSBCTRL_POLL_DRIVER, NULL, NULL, NULL, NULL);
|
|
||||||
|
|
||||||
sched ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void app_main (void) {
|
void app_main (void) {
|
||||||
libprocess_self_init ();
|
libprocess_self_init ();
|
||||||
@@ -44,13 +34,14 @@ void app_main (void) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct process_data* pdata = process_spawn (&usb_poll_driver_proc, info);
|
mprintf ("Polling device %s\n", info->key);
|
||||||
|
|
||||||
mprintf ("Started USB poller process: PID %d\n", pdata->pid);
|
for (;;) {
|
||||||
|
device_do (info->key, XUSBCTRL_POLL_DRIVER, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
sched ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;)
|
|
||||||
;
|
|
||||||
} else {
|
} else {
|
||||||
mprintf ("ERROR unknown command %s\n", commandbuf);
|
mprintf ("ERROR unknown command %s\n", commandbuf);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user