[beagleboard] USB Controller

hi,

First you will need a USB hub, because most of USB game controllers are
low/full speed devices, and BB only has high-speed port.

Second, your Linux kernel should be configured to support your game
controller (example CONFIG_HID_LOGITECH).

Then you can use 'input event' user interface:

- Linux kernel sb. configured with CONFIG_INPUT_EVDEV and maybe
CONFIG_INPUT_JOYDEV as well.
- You can access game controller from an user application, it is as
simple as:

#include <linux/joystick.h>

        struct js_event jev;
        int jsfd = open("/dev/input/js0", O_RDONLY | O_NONBLOCK);

        while (read(jsfd, &jev, sizeof(jev)) > 0 ) {
            if (jev.type & JS_EVENT_AXIS) {
                if (jev.number&1) { /* Only consider Y axis */
                    if (jev.value>0x4000 && go_up==0) go_up = 1;
                    if (jev.value==0) go_up = go_down = 0;
                    if (jev.value<-0x4000 && go_down==0) go_down = 1;
                }
            }
            if (jev.type & JS_EVENT_BUTTON) {
                if (jev.number==0 && jev.value) play = 1;
            }
        }

Have fun.