IIO: Changes modules as per new MRAA API

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
Abhishek Malik 2017-09-11 16:35:25 -07:00
parent cc3721128e
commit 6ac2557b7d
9 changed files with 12 additions and 12 deletions

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