Diverge,
Use return values from Rivatuner. It should give them. I take it you are calling it with something like. In C I would do something like:
int main(int argc, char **argv) {
...
int rt_ret = 0;
sprintf(buf, "rivatuner.exe /ri%d,%s,%s\n", BUS_NUM, BUS_ADDR, REG_OFFSET");
rt_ret = system("buf");
switch(rt_ret) {
case 0: printf("Volterra VR detected\n");
goto next;
case 1: printf("Volterra VR not detected\n");
goto exit_fail;
}
next:
read_i2c_vr_reg(argv[0]);
...
exit_fail:
printf("You are unable to use this application because your hardware isn't supported\n");
return 1;
...
}
I just woke up so I'm still half asleep but something like that should work in theory. Unwinder would no doubt have return values![]()



Reply With Quote
Bookmarks