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

Add API to set ticker IRQ handler. #5369

Merged
merged 1 commit into from Nov 1, 2017

Conversation

Projects
None yet
7 participants
@mprse
Member

mprse commented Oct 24, 2017

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

@0xc0170

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.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 24, 2017

Labeled for 5.7.0 , new API addition

@bulislaw

This comment has been minimized.

Member

bulislaw commented Oct 26, 2017

Good point, @mprse could you add comment that it's primarily for testing purposes and it's not required part of HAL implementation.

@0xc0170 0xc0170 added the needs: work label Oct 26, 2017

@mprse mprse force-pushed the mprse:ticker_irq_handler_set branch Oct 27, 2017

@mprse

This comment has been minimized.

Member

mprse commented Oct 27, 2017

@0xc0170 @bulislaw
Added the following note in the description:

this function is primarily for testing purposes and it's not required part of HAL implementation

@0xc0170

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

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Oct 27, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 27, 2017

/morph build

Add API to set ticker IRQ handler.
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.

@mprse mprse force-pushed the mprse:ticker_irq_handler_set branch to 5da5b28 Oct 30, 2017

@mprse

This comment has been minimized.

Member

mprse commented Oct 30, 2017

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'

Commit message has been updated as requested.

@studavekar

This comment has been minimized.

Collaborator

studavekar commented Oct 30, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 30, 2017

Build : SUCCESS

Build number : 370
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5369/

Triggering tests

/morph test
/morph uvisor-test

@mbed-ci

This comment has been minimized.

@adbridge adbridge added ready for merge and removed needs: CI labels Oct 31, 2017

@theotherjimmy theotherjimmy merged commit bfcb173 into ARMmbed:master Nov 1, 2017

5 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment