Hello, I patched the linux kernel 3.8.13 with Xenomai 2.6.3 using Robert Nelson instructions : https://github.com/cdsteinkuehler/linux-dev/tree/3.8.13-xenomai/patches, and I want to capture interrupt GPIOs using the Xenomai API on the Pin 12 on the P9 header (gpio_1[28] ==> GPIO 60), using this code :
/* * main.cpp * * Created on: 26 mars 2014 * Author: daivymerlijs */ #include <stdio.h> #include <sys/mman.h> #include <xenomai/native/task.h> #include <xenomai/native/intr.h> static RT_INTR intr; int main() { mlockall(MCL_CURRENT | MCL_FUTURE); rt_task_shadow(NULL,NULL,90,0); rt_intr_create(&intr,NULL,60,0); //not the correct value rt_intr_enable(&intr); while(1){ printf("Waiting interruption... \n"); rt_intr_wait(&intr,TM_INFINITE); printf("Interruption OK"); } return 0; } I want to capture the interruption by using a button connected to that GPIO, because BBB can capture 1-0 or 0-1 interruption. So, if everything is alright and I press the button, "rt_intr_wait" will deblock (it's a blocking fonction) and will print "Interruption OK". The main problem is "rt_intr_create", where I don't know the correct value to use, because the GPIO number is not the correct the value to use, the value I need to know is the value used by the kernel ID that is linked with the GPIO. However, I can't find this information anywhere. At the opposite of some cards, like FOXG20, which tell me what is the ID number depending of the kernel version :http://www.acmesystems.it/pinout_foxg20 So I think I should find a similar information in the BBB documentation (and the Texas Instruement documentation too) , but I can't find it anywhere. I need a lot of help on this, I hope you guys can help me. Thanks, Daivy -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.