Skip to content

sys/ztimer: increase xtimer_compat coverage#15605

Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom
maribu:ztimer_xtimer_compat
Dec 13, 2020
Merged

sys/ztimer: increase xtimer_compat coverage#15605
benpicco merged 1 commit intoRIOT-OS:masterfrom
maribu:ztimer_xtimer_compat

Conversation

@maribu
Copy link
Copy Markdown
Member

@maribu maribu commented Dec 9, 2020

Contribution description

  • add some xtimer specific defines some tests rely on
  • provide the following missing functions:
    • xtimer_ticks()
    • xtimer_set_timeout_flag()
    • xtimer_set_timeout_flag64()
    • xtimer_spin()

Testing procedure

  • USEMODULE=ztimer_xtimer_compat make flash text -C tests/thread_flags
  • USEMODULE=ztimer_xtimer_compat make flash text -C tests/xtimer_now_irq

Should now compile and pass, but fail to compile with master.

Issues/PRs references

None

- add some xtimer specific defines some tests rely on
- provide the following missing functions:
    - xtimer_ticks()
    - xtimer_set_timeout_flag()
    - xtimer_set_timeout_flag64()
    - xtimer_spin()
@maribu maribu added Area: timers Area: timer subsystems Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation labels Dec 9, 2020
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Dec 10, 2020
@benpicco benpicco merged commit cc55d4c into RIOT-OS:master Dec 13, 2020
Comment on lines +44 to +45
#define XTIMER_WIDTH (32)
#define XTIMER_MASK (0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Won't this conflict with the definition in board.h?
(sorry, noticed this too late)


static inline void xtimer_set_timeout_flag64(xtimer_t *t, uint64_t timeout)
{
xtimer_set_timeout_flag(t, timeout);
Copy link
Copy Markdown
Contributor

@kaspar030 kaspar030 Dec 14, 2020

Choose a reason for hiding this comment

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

This cuts off the high bits, silently, without comment?

@maribu maribu deleted the ztimer_xtimer_compat branch December 14, 2020 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: timers Area: timer subsystems CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants