Would you use this?
 33%  [ 1 ]
I do not have a chatpad, otherwise yes
 66%  [ 2 ]
Total Votes : 3

The goal of this project is to make a better driver for the xBox 360's gamepad. The main reason I want to do this is to have chatpad support in Android, Linux, Windows, etc.

I am using libUSB at the moment, but I hope to move to the native usb support on the supported platforms. (ie kernel driver in linux)

I will of course make this open source.

At the moment I am attempting to have libUSB hotplug support but it does not seem to be working.


#include <signal.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <unistd.h>
#include <libusb-1.0/libusb.h>
#include <pthread.h>

 * 045E:028E
 * Class:      0xFF
 * Subclass:   0x5D

#define VID 0x045E
#define PID 0x028E

libusb_context               *libusb         = 0;
libusb_hotplug_callback_handle   callbackHandle      = 0;

void exitDriver(){
   if(callbackHandle != 0){
   if(libusb != 0){

void sigHandle(int sig){
   printf("Caught signal %d\n", sig);

int hotplug(libusb_context *ctx, libusb_device *device, libusb_hotplug_event event, void *user_data){
   return 0;

int main() {
   struct sigaction sigIntHandler;
   sigIntHandler.sa_handler = sigHandle;
   sigIntHandler.sa_flags = 0;
   sigaction(SIGINT, &sigIntHandler, 0);
   printf("Starting driver...\n");
   int rc;
   rc = libusb_init(&libusb);
   if(rc != 0){
      printf("%d\n", rc);
   rc = libusb_hotplug_register_callback(
   if(rc != 0){
      printf("%d\n", rc);
   return 0;
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum