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

Review all register methods for ISR and call from constructor when possible. #35

Closed
jfpoilpret opened this issue May 4, 2019 · 2 comments
Assignees
Milestone

Comments

@jfpoilpret
Copy link
Owner

Many FastArduino API classes define a public register_xxx_handler() method when it has callback methods to be called by an ISR (itself registered with one REGISTER_XXX macro).

In most cases currently, calling this method is the responsibility of the application developer, but it is easy to forget and in this case, it may take time to understand why the program does not seem to work at all!

The purpose of this issue is to review all FastArduino classes with a public register_xxx_handler() method, check if that method should rather be called at construction time, and if so, simply move its code to the constructor(s).

@jfpoilpret jfpoilpret self-assigned this May 4, 2019
@jfpoilpret jfpoilpret added this to the 1.2 milestone May 4, 2019
@jfpoilpret
Copy link
Owner Author

Started working on this issue (branch register_methods_review).
All transformations done, examples adapted and doc updated.
Next step is to check all relevant examples and debug if needed.
Shall be finished this week-end.

jfpoilpret pushed a commit that referenced this issue May 11, 2019
Always call register_ methods from constructor (issue #35)
@jfpoilpret
Copy link
Owner Author

Fixed as of commit 620b694

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant