USB Roll-up drum kit user-space driver for linux

From Organic Design
Revision as of 05:12, 21 January 2009 by Rob (talk | contribs) (just reads from the pipe for now)
Jump to: navigation, search
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>


struct rec { 
	int x,y,z; 
	};

int main() {

	FILE *f;    
  int i,j;    
  struct rec r;

  f=fopen("/dev/random","r");    

	while(fread(&r,sizeof(struct rec),1,f) != 0)
		printf("%d\n",r.x);    


  fclose(f);    

  printf("\n");
	
	
}