-
Hi! In some cases, inline c can be called a bit more 'directly' - eg setWatch(..., {irq:true}).
However for NFC and Bluetooth stuff it's not really possible - they are designed around a message queue, which pushes data from interrupt-land down to the message loop. By the time you're in the message loop and have seen that you're calling inline c, it's too late.
Would it be at all possible to call NRF.nfcSend or the native equivalent function from compiledC?
I could be wrong, but it seems if
hal_nfc_send
, andhal_nfc_send_rsp
were exported for web compilation that it could work purely from C without even another command once it jumps back to javascriptI hope I'm not being too annoying with all these questions... just trying to figure out a way to write a fast script that doesn't require a custom firmware
In a way it might be nice to have a bit of a standard library of functions (eg digitaWrite/etc) that can be called from Inline C
Yes it would be...
Hi! In some cases, inline c can be called a bit more 'directly' - eg
setWatch(..., {irq:true})
.However for NFC and Bluetooth stuff it's not really possible - they are designed around a message queue, which pushes data from interrupt-land down to the message loop. By the time you're in the message loop and have seen that you're calling inline c, it's too late.
Judging by your other posts about NFC/Inline C, I think you're at the point where you really want to be looking at compiling your own firmware to implement what you want - it's really not hard at all.
In theory, yes. You have access to these functions: https://github.com/gfwilliams/EspruinoCompiler/blob/master/src/utils.js#L74
So you could do something like:
In a way it might be nice to have a bit of a standard library of functions (eg digitaWrite/etc) that can be called from Inline C