Compare commits

...

2 Commits

Author SHA1 Message Date
93054c382b Cmake: Bumping up required MRAA version
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2017-09-15 11:25:20 -07:00
6ac2557b7d IIO: Changes modules as per new MRAA API
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2017-09-15 11:03:17 -07:00
10 changed files with 13 additions and 13 deletions

View File

@ -123,7 +123,7 @@ find_package (PkgConfig REQUIRED)
# Force a libmraa search and minimum required version every time a config is generated # Force a libmraa search and minimum required version every time a config is generated
unset(MRAA_FOUND CACHE) unset(MRAA_FOUND CACHE)
set(MRAA_MINIMUM 1.7.0) set(MRAA_MINIMUM 1.8.0)
pkg_check_modules (MRAA REQUIRED mraa>=${MRAA_MINIMUM}) pkg_check_modules (MRAA REQUIRED mraa>=${MRAA_MINIMUM})
# Also, get full path to the mraa library # Also, get full path to the mraa library
find_library(MRAA_LIBRARY NAMES mraa HINTS ${MRAA_LIBDIR}) find_library(MRAA_LIBRARY NAMES mraa HINTS ${MRAA_LIBDIR})

View File

@ -41,7 +41,7 @@ sig_handler(int signo)
} }
void void
data_callback(char* data) data_callback(char* data, void* args)
{ {
float x, y, z; float x, y, z;
accelerometer->extract3Axis(data, &x, &y, &z); accelerometer->extract3Axis(data, &x, &y, &z);

View File

@ -41,7 +41,7 @@ sig_handler(int signo)
} }
void void
data_callback(char* data) data_callback(char* data, void* args)
{ {
float x, y, z; float x, y, z;
if (gyroscope->extract3Axis(data, &x, &y, &z)) { if (gyroscope->extract3Axis(data, &x, &y, &z)) {

View File

@ -40,7 +40,7 @@ sig_handler(int signo)
} }
void void
data_callback(char* data) data_callback(char* data, void* args)
{ {
float x, y, z; float x, y, z;
double azimuth; double azimuth;

View File

@ -65,9 +65,9 @@ KXCJK1013::~KXCJK1013()
} }
void void
KXCJK1013::installISR(void (*isr)(char*), void* arg) KXCJK1013::installISR(void (*isr)(char*, void*), void* arg)
{ {
mraa_iio_trigger_buffer(m_iio, isr, NULL); mraa_iio_trigger_buffer(m_iio, isr, arg);
} }
int64_t int64_t

View File

@ -74,7 +74,7 @@ class KXCJK1013
* @param arg Pointer to an object to be supplied as an * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */
void installISR(void (*isr)(char*), void* arg); void installISR(void (*isr)(char*, void*), void* arg);
/** /**
* Extract the channel value based on channel type * Extract the channel value based on channel type

View File

@ -344,9 +344,9 @@ uint8_t L3GD20::getStatusBits()
void void
L3GD20::installISR(void (*isr)(char*), void* arg) L3GD20::installISR(void (*isr)(char*, void*), void* arg)
{ {
mraa_iio_trigger_buffer(m_iio, isr, NULL); mraa_iio_trigger_buffer(m_iio, isr, arg);
} }
int64_t int64_t

View File

@ -547,7 +547,7 @@ class L3GD20
* @param arg Pointer to an object to be supplied as an * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */
void installISR(void (*isr)(char*), void* arg); void installISR(void (*isr)(char*, void*), void* arg);
/** /**
* Extract the channel value based on channel type. IIO only. * Extract the channel value based on channel type. IIO only.

View File

@ -99,9 +99,9 @@ MMC35240::~MMC35240()
} }
void void
MMC35240::installISR(void (*isr)(char*), void* arg) MMC35240::installISR(void (*isr)(char*, void*), void* arg)
{ {
mraa_iio_trigger_buffer(m_iio, isr, NULL); mraa_iio_trigger_buffer(m_iio, isr, arg);
} }
int64_t int64_t

View File

@ -108,7 +108,7 @@ class MMC35240
* @param arg Pointer to an object to be supplied as an * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */
void installISR(void (*isr)(char*), void* arg); void installISR(void (*isr)(char*, void*), void* arg);
/** /**
* Extract the channel value based on channel type * Extract the channel value based on channel type