mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-27 06:58:19 +00:00
20
bsps/shared/grlib/drvmgr/get_resarray_count.c
Normal file
20
bsps/shared/grlib/drvmgr/get_resarray_count.c
Normal file
@@ -0,0 +1,20 @@
|
||||
/* Common driver configuration routines.
|
||||
*
|
||||
* COPYRIGHT (c) 2015.
|
||||
* Cobham Gaisler.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <grlib/bspcommon.h>
|
||||
|
||||
int get_resarray_count(struct drvmgr_bus_res **array)
|
||||
{
|
||||
int i = 0;
|
||||
while (array[i] != NULL)
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
Reference in New Issue
Block a user