diff options
Diffstat (limited to 'lib/4a-hal-utilities/4a-hal-utilities-data.c')
-rw-r--r-- | lib/4a-hal-utilities/4a-hal-utilities-data.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-data.c b/lib/4a-hal-utilities/4a-hal-utilities-data.c index 979f46d..3ac2a7c 100644 --- a/lib/4a-hal-utilities/4a-hal-utilities-data.c +++ b/lib/4a-hal-utilities/4a-hal-utilities-data.c @@ -302,6 +302,18 @@ struct InternalHalProbedDevice *HalUtlSearchProbedDeviceDataById(struct cds_list return NULL; } +int HalUtlGetProbedDeviceCardNbUsingUid(struct cds_list_head *probedDevicesListHead, char *uid) +{ + struct InternalHalProbedDevice *currentProbedDeviceData; + + currentProbedDeviceData = HalUtlSearchProbedDeviceDataById(probedDevicesListHead, uid); + if(! currentProbedDeviceData || + ! currentProbedDeviceData->deviceData) + return HAL_UNKNOWN_DEVICE; + + return currentProbedDeviceData->deviceData->cardNb; +} + struct InternalHalDeviceData *HalUtlAllocateAndFillProbedDeviceDataUsingInfoGetResponse(json_object *responseJ) { struct InternalHalDeviceData *currentProbedDeviceData; |