[riot-notifications] [RIOT-OS/RIOT] [GPIO] - External interrupt (#16801)
notifications at github.com
Fri Sep 3 00:27:34 CEST 2021
Hi everyone. Because I wasn't able to post my issue on [RIOT forum](https://forum.riot-os.org/), I put it here. I've got two questions about **```int gpio_init_int()```** function.
1. Is there any infinite loop implemented in this method, that makes a program working constantly? After I put this method into the ```int main()``` function, my programme was kept alive.
2. Second question, I think more crucial to me, is whether a callback function (passed as an argument to this method) executes on the different thread than the rest of code or not. I had a case, when in the callback function I was sending an IPC message - ```msg_t``` to the another thread, let's call it **THREAD2**. When my pin was interrupted for the first time, callback function executed on the thread with proccess ID (```kernel_pid_t```) equaled **1**. Then, after second thread received IPC message and executed its code on the thread with ID = **2**, any next pin interruption caused, that callback function always executed on the same thread as **THREAD2** with ID = **2**. Why there was no thread disitinction between those two processes?
Thanks in advance
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications