T Tron71 Member Licensed User Longtime User May 7, 2020 #1 Using inline C to scan for BLE devices I have found that timers are not run. Is this correct? I need to check the status of an input PIN while the BLE devices are scanned and setup a timer to run every 100ms to check this but if the input changes during the BLE scan the change will be missed. Hope someone can help.
Using inline C to scan for BLE devices I have found that timers are not run. Is this correct? I need to check the status of an input PIN while the BLE devices are scanned and setup a timer to run every 100ms to check this but if the input changes during the BLE scan the change will be missed. Hope someone can help.
Erel B4X founder Staff member Licensed User Longtime User May 7, 2020 #2 Tron71 said: Using inline C to scan for BLE devices I have found that timers are not run. Is this correct? Click to expand... Yes. It doesn't matter whether it is B4R code or C code. Upvote 0
Tron71 said: Using inline C to scan for BLE devices I have found that timers are not run. Is this correct? Click to expand... Yes. It doesn't matter whether it is B4R code or C code.
T Tron71 Member Licensed User Longtime User May 7, 2020 #3 Are hardware timers and/or hardware interrupts supported in B4R? Or can a block of inline C be assigned to run from the second core on the ESP32 thus freeing the first core to continue as normal. Upvote 0
Are hardware timers and/or hardware interrupts supported in B4R? Or can a block of inline C be assigned to run from the second core on the ESP32 thus freeing the first core to continue as normal.
Erel B4X founder Staff member Licensed User Longtime User May 7, 2020 #4 Interrupts are partially supported. A library can handle an interrupt however the B4R code will always run through the internal message queue. You can implement interrupts in inline C code. Running code in interrupts is problematic and requires deep knowledge of the internal SDK. You cannot use the second core. Upvote 0
Interrupts are partially supported. A library can handle an interrupt however the B4R code will always run through the internal message queue. You can implement interrupts in inline C code. Running code in interrupts is problematic and requires deep knowledge of the internal SDK. You cannot use the second core.