#include <stdio.h>
#include <signal.h>
#include <getopt.h>
#define I2C_BUS 2
static int running = 0;
static void __signal_handler(__attribute__ ((unused)) int dummy)
{
running=0;
return;
}
static void __tap_callback_func(int direction, int counter)
{
switch(direction){
case 1:
printf("received tap in direction: X+");
break;
case 2:
printf("received tap in direction: X-");
break;
case 3:
printf("received tap in direction: Y+");
break;
case 4:
printf("received tap in direction: Y-");
break;
case 5:
printf("received tap in direction: Z+");
break;
case 6:
printf("received tap in direction: Z-");
break;
default:
printf("invalid tap direction: %d", direction);
}
printf(" counter: %d\n", counter);
fflush(stdout);
return;
}
int main()
{
signal(SIGINT, __signal_handler);
running = 1;
fprintf(stderr,"rc_mpu_initialize_dmp_failed\n");
return -1;
}
while(running){
}
return 0;
}