Skip to content

Add dmosi SAL implementation for Dmod_GetUptime#26

Merged
JohnAmadis merged 2 commits intomainfrom
copilot/add-sal-api-dmod-get-uptime
Feb 23, 2026
Merged

Add dmosi SAL implementation for Dmod_GetUptime#26
JohnAmadis merged 2 commits intomainfrom
copilot/add-sal-api-dmod-get-uptime

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 23, 2026

Dmod_GetUptime was added to the DMOD SAL but lacked an implementation in dmosi. The dmosi layer is the natural place to wire it up via the existing tick-count API.

Changes

  • src/dmosi.c — New "DMOD Time API Implementation" section implementing Dmod_GetUptime by delegating to dmosi_get_tick_count(), cast to Dmod_Timestamp_t (uint64_t). Assumes standard 1 ms/tick RTOS configuration.

  • CMakeLists.txt — Adds DMOSI_DONT_IMPLEMENT_DMOD_API_TIME opt-out flag, consistent with the existing per-subsystem guard pattern (MUTEX, ENV, PROC).

Dmod_Timestamp_t Dmod_GetUptime(void)
{
    return (Dmod_Timestamp_t)dmosi_get_tick_count();
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Dodać implementację SAL API Dmod_GetUptime</issue_title>
<issue_description>DMOD został ostatnio wzbogacony o funkcję Dmod_GetUptime - dodajmy naszą implementację, która będzie domyślnie używać API pobierania ticków</issue_description>

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


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot AI changed the title [WIP] Add implementation of SAL API Dmod_GetUptime Add dmosi SAL implementation for Dmod_GetUptime Feb 23, 2026
Copilot AI requested a review from JohnAmadis February 23, 2026 17:21
@JohnAmadis JohnAmadis marked this pull request as ready for review February 23, 2026 17:27
@JohnAmadis JohnAmadis merged commit 2f517a0 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ć implementację SAL API Dmod_GetUptime

2 participants