source: rtems/c/src/lib/libbsp/sparc/shared/drvmgr/get_resarray_count.c @ 3f38335b

4.11
Last change on this file since 3f38335b was 3f38335b, checked in by Daniel Hellstrom <daniel@…>, on Feb 10, 2015 at 3:05:38 PM

LEON: added get_resarray_count() helper routine

  • Property mode set to 100644
File size: 430 bytes
Line 
1/*  Common driver configuration routines.
2 *
3 *  COPYRIGHT (c) 2015.
4 *  Cobham Gaisler.
5 *
6 *  The license and distribution terms for this file may be
7 *  found in found in the file LICENSE in this distribution or at
8 *  http://www.rtems.com/license/LICENSE.
9 */
10
11#include <stdlib.h>
12#include <drvmgr/bspcommon.h>
13
14int get_resarray_count(struct drvmgr_bus_res **array)
15{
16        int i = 0;
17        while (array[i] != NULL)
18                i++;
19        return i;
20}
Note: See TracBrowser for help on using the repository browser.