diff options
Diffstat (limited to '4a-hal/4a-hal-utilities/4a-hal-utilities-data.c')
-rw-r--r-- | 4a-hal/4a-hal-utilities/4a-hal-utilities-data.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c index d585f5d..b2c4b25 100644 --- a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c +++ b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c @@ -187,6 +187,25 @@ struct SpecificHalData *HalUtlSearchHalDataByApiName(struct SpecificHalData **fi return NULL; } + +struct SpecificHalData *HalUtlSearchReadyHalDataByCarId(struct SpecificHalData **firstHalData, int cardId) +{ + struct SpecificHalData *currentApi; + + if(! firstHalData) + return NULL; + + currentApi = *firstHalData; + while(currentApi) { + if(currentApi->status == HAL_STATUS_READY && currentApi->sndCardId == cardId) + return currentApi; + + currentApi = currentApi->next; + } + + return NULL; +} + /******************************************************************************* * Hal Manager data handling functions * ******************************************************************************/ |