Skip to content

Add system time interface for reading RTOS tick count#24

Merged
JohnAmadis merged 2 commits intomainfrom
copilot/add-system-time-interface
Feb 23, 2026
Merged

Add system time interface for reading RTOS tick count#24
JohnAmadis merged 2 commits intomainfrom
copilot/add-system-time-interface

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 23, 2026

DMOSI lacked any interface to read the current RTOS system clock (SysTick), making it impossible for consumers to query elapsed time or implement tick-based logic through the OSI abstraction layer.

Changes

  • include/dmosi.h – New DMOSI_SYSTIME_API section exposing dmosi_get_tick_count(), returning the uint32_t RTOS tick count elapsed since scheduler start
  • src/dmosi.c – Weak default implementation returning 0; overridden by the RTOS port (e.g. xTaskGetTickCount() on FreeRTOS, osKernelGetTickCount() on CMSIS-RTOS2)

Usage

uint32_t t0 = dmosi_get_tick_count();
// ... do work ...
uint32_t elapsed_ticks = dmosi_get_tick_count() - t0;
Original prompt

This section details on the original issue you should resolve

<issue_title>Dodać interfejs do pobierania system time</issue_title>
<issue_description>Potrzebny jest interfejs, który nam zwróci aktualny stan systemowego zegara (użytego przez RTOS - SysTick)</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot AI changed the title [WIP] Add interface to retrieve system time Add system time interface for reading RTOS tick count Feb 23, 2026
Copilot AI requested a review from JohnAmadis February 23, 2026 16:18
@JohnAmadis JohnAmadis marked this pull request as ready for review February 23, 2026 16:28
@JohnAmadis JohnAmadis merged commit d1e841b into main Feb 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dodać interfejs do pobierania system time

2 participants