Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[💫addFunctions]: External Interrupts #66

Open
usuyuki opened this issue Dec 7, 2023 · 2 comments
Open

[💫addFunctions]: External Interrupts #66

usuyuki opened this issue Dec 7, 2023 · 2 comments
Assignees
Labels
💫addFunctions wasm3に関数登録機能追加

Comments

@usuyuki
Copy link
Member

usuyuki commented Dec 7, 2023

✨ 概要

なぜ必要

備考

@usuyuki usuyuki added the 💫addFunctions wasm3に関数登録機能追加 label Dec 7, 2023
@usuyuki usuyuki self-assigned this Dec 7, 2023
@usuyuki
Copy link
Member Author

usuyuki commented Dec 7, 2023

https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/

WebAssemblyから関数渡しできないので,これ実装無理では.
WebAssembly内の関数名の取得も無理なので,自前で実装するにしてもコンパイラのレベルで細工が必要.

@usuyuki
Copy link
Member Author

usuyuki commented Dec 7, 2023

番号とかで関数を指定できても,C→WebAssemblyが難しい.

  IM3Function f;
  result = m3_FindFunction(&f, runtime, "_start");
  if (result)
  {
    wasm3_error_printer("m3_FindFunction", result);
  }

でできる可能性はあるが,これはあくまでエントリーポイントとなる関数指定

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💫addFunctions wasm3に関数登録機能追加
Projects
None yet
Development

No branches or pull requests

1 participant