-
Notifications
You must be signed in to change notification settings - Fork 3k
Add API to set ticker IRQ handler. #5369
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to have here the reason for this API, as it is part of HAL, if I am porting, I would probably implement this without knowing that there is default implementation. As I understand this API is used primary for tests, any target should use default application.
Labeled for 5.7.0 , new API addition |
Good point, @mprse could you add comment that it's primarily for testing purposes and it's not required part of HAL implementation. |
eaac822
to
05a5baf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit msg can provide more information about the change (why this is being added, how to use new API in this case), would help all of us
/morph build |
This API is added primarily for testing purposes, to be able to test HAL drivers without using upper layers to handle ticker interrupt. By default IRQ handler is set to ticker_irq_handler() for us ticker and lp ticker - original one. Usage example (setting custom ticker irq handler): void my_irq_handler(const ticker_data_t *const) { // handle interrupt } ticker_irq_handler_type old_handler = set_us_ticker_irq_handler(my_irq_handler); Respectively for lp timer set_lp_ticker_irq_handler() API should be used.
05a5baf
to
5da5b28
Compare
Commit message has been updated as requested. |
/morph build |
Build : SUCCESSBuild number : 370 Triggering tests/morph test |
Test : SUCCESSBuild number : 182 |
Cherry-picking from #5234, going to master
cc @c1728p9 @0xc0170
Description
Add API to set IRQ handler for high frequency ticker and low power ticker.
This is done to be able to test HAL ticker API without using mbed upper layers to connect IRQ handler.
Status
READY
Migrations
YES
Add API to set IRQ handler for high frequency ticker and low power ticker.
Original IRQ handler is set as default ticker IRQ handler which should be used by all targets.
Related PRs
------ | ------
ARMmbed:feature-hal-spec-ticker | #5233