Skip to content

xtimer: add support for arbitrary timer tick conversion#4002

Closed
kaspar030 wants to merge 6 commits intoRIOT-OS:masterfrom
kaspar030:xtimer_add_arbitrary_timer_hz
Closed

xtimer: add support for arbitrary timer tick conversion#4002
kaspar030 wants to merge 6 commits intoRIOT-OS:masterfrom
kaspar030:xtimer_add_arbitrary_timer_hz

Conversation

@kaspar030
Copy link
Copy Markdown
Contributor

(just an idea)

compare #3990.

This PR basically swaps XTIMER_SHIFT with the possiblity to use any conversion macro.

@kaspar030 kaspar030 added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR TimerTaskForce Area: timers Area: timer subsystems labels Sep 30, 2015
@jnohlgard
Copy link
Copy Markdown
Member

@kaspar030 Do you want to keep this open while #3990 is still open or can we close this?

@OlegHahm OlegHahm modified the milestone: Release 2016.03 Dec 8, 2015

static inline uint64_t div_u64_by_1000000(uint64_t val)
{
return (uint64_t)(val * 0x431bde83) >> (0x12 + 32);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also be ul for 16-bit and 8-bit platforms?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which one? :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a little bit unsure how 8-bit or 16-bit platforms would interpret 0x431bde83

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the div stuff is long merged, btw...)

@OlegHahm
Copy link
Copy Markdown
Member

Still WIP => postpone.

@kYc0o
Copy link
Copy Markdown
Contributor

kYc0o commented Jul 25, 2016

Very old PR addressing a common issue. @kaspar030 would you like to close it in favor of #5608 ?

@kYc0o kYc0o modified the milestones: Release 2016.10, Release 2016.07 Jul 25, 2016
@miri64
Copy link
Copy Markdown
Member

miri64 commented Oct 31, 2016

Fixes #5237, but needs to be postponed :(

@miri64 miri64 modified the milestones: Release 2017.01, Release 2016.10 Oct 31, 2016
@kYc0o
Copy link
Copy Markdown
Contributor

kYc0o commented Jan 11, 2017

Wasn't solved with #5608 ?

@PeterKietzmann
Copy link
Copy Markdown
Member

Yes, seems so.

@kaspar030 kaspar030 deleted the xtimer_add_arbitrary_timer_hz branch February 7, 2017 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: timers Area: timer subsystems Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants