mraa.c: iio detect tidy up.
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
c1d081c783
commit
7ea11f0dd3
18
src/mraa.c
18
src/mraa.c
@@ -73,15 +73,6 @@ mraa_set_log_level(int level)
|
|||||||
return MRAA_ERROR_INVALID_PARAMETER;
|
return MRAA_ERROR_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
mraa_count_iio_devices(const char* path, const struct stat* sb, int flag, struct FTW* ftwb)
|
|
||||||
{
|
|
||||||
// we are only interested in files with specific names
|
|
||||||
if (fnmatch(IIO_DEVICE_WILDCARD, basename(path), 0) == 0) {
|
|
||||||
num_iio_devices++;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if (defined SWIGPYTHON) || (defined SWIG)
|
#if (defined SWIGPYTHON) || (defined SWIG)
|
||||||
mraa_result_t
|
mraa_result_t
|
||||||
@@ -198,6 +189,15 @@ mraa_set_priority(const unsigned int priority)
|
|||||||
return sched_setscheduler(0, SCHED_RR, &sched_s);
|
return sched_setscheduler(0, SCHED_RR, &sched_s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
mraa_count_iio_devices(const char* path, const struct stat* sb, int flag, struct FTW* ftwb)
|
||||||
|
{
|
||||||
|
// we are only interested in files with specific names
|
||||||
|
if (fnmatch(IIO_DEVICE_WILDCARD, basename(path), 0) == 0) {
|
||||||
|
num_iio_devices++;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
mraa_result_t
|
mraa_result_t
|
||||||
mraa_iio_detect()
|
mraa_iio_detect()
|
||||||
|
|||||||
Reference in New Issue
Block a user