From f5d71a59b5da1091c0f456873818e2767ed45077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominic=20H=C3=B6glinger?= Date: Wed, 8 Oct 2025 17:45:32 +0200 Subject: [PATCH] TactilityC: Radio - Getter for DevId --- TactilityC/Include/tt_hal_radio.h | 7 +++++++ TactilityC/Source/tt_hal_radio.cpp | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/TactilityC/Include/tt_hal_radio.h b/TactilityC/Include/tt_hal_radio.h index ed994c2a..0cda5d95 100644 --- a/TactilityC/Include/tt_hal_radio.h +++ b/TactilityC/Include/tt_hal_radio.h @@ -86,6 +86,13 @@ RadioHandle tt_hal_radio_alloc(DeviceId radioId); */ void tt_hal_radio_free(RadioHandle handle); +/** + * Get the device identifier for the radio driver object. + * @param[in] handle the radio driver handle + * @return the device identifier + */ +DeviceId tt_hal_radio_get_device_id(RadioHandle handle); + /** * Get the name for the radio driver object. * @param[in] handle the radio driver handle diff --git a/TactilityC/Source/tt_hal_radio.cpp b/TactilityC/Source/tt_hal_radio.cpp index e308b7fa..4ec2fb7c 100644 --- a/TactilityC/Source/tt_hal_radio.cpp +++ b/TactilityC/Source/tt_hal_radio.cpp @@ -50,6 +50,11 @@ extern "C" { delete wrapper; } + DeviceId tt_hal_radio_get_device_id(RadioHandle handle) { + auto wrapper = static_cast(handle); + return wrapper->device->getId(); + } + const char* tt_hal_radio_get_name(RadioHandle handle) { auto wrapper = static_cast(handle); return wrapper->name.c_str();