TactilityC: Radio - Getter for DevId

This commit is contained in:
Dominic Höglinger 2025-10-08 17:45:32 +02:00
parent 795a882280
commit f5d71a59b5
2 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -50,6 +50,11 @@ extern "C" {
delete wrapper;
}
DeviceId tt_hal_radio_get_device_id(RadioHandle handle) {
auto wrapper = static_cast<DeviceWrapper*>(handle);
return wrapper->device->getId();
}
const char* tt_hal_radio_get_name(RadioHandle handle) {
auto wrapper = static_cast<DeviceWrapper*>(handle);
return wrapper->name.c_str();