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

From Organic Design wiki
Revision as of 03:12, 21 January 2009 by Rob (talk | contribs) (just reads from the pipe for now)
#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");
	
	
}