mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +03:00
Moved SWIG code from C++ files (hpp and cxx) to SWIG interface files (.i). Added getter/setter methods for classes with protected or private vars.
This commit is contained in:
@ -42,6 +42,24 @@
|
||||
#include "lsm9ds0.hpp"
|
||||
%}
|
||||
|
||||
%ignore installISR(LSM6DSL_INTERRUPT_PINS_T , int , mraa::Edge , void *, void *);
|
||||
|
||||
%extend upm::LSM9DS0 {
|
||||
installISR(INTERRUPT_PINS_T intr, int gpio, mraa::Edge level,
|
||||
jobject runnable)
|
||||
{
|
||||
// delete any existing ISR and GPIO context
|
||||
$self->uninstallISR(intr);
|
||||
|
||||
// greate gpio context
|
||||
getPin(intr) = new mraa::Gpio(gpio);
|
||||
|
||||
getPin(intr)->dir(mraa::DIR_IN);
|
||||
getPin(intr)->isr(level, runnable);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
%include "lsm9ds0.hpp"
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_lsm9ds0)
|
||||
|
@ -43,15 +43,15 @@ LSM9DS0::LSM9DS0(int bus, bool raw, uint8_t gAddress, uint8_t xmAddress) :
|
||||
m_accelX = 0.0;
|
||||
m_accelY = 0.0;
|
||||
m_accelZ = 0.0;
|
||||
|
||||
|
||||
m_gyroX = 0.0;
|
||||
m_gyroY = 0.0;
|
||||
m_gyroZ = 0.0;
|
||||
|
||||
|
||||
m_magX = 0.0;
|
||||
m_magY = 0.0;
|
||||
m_magZ = 0.0;
|
||||
|
||||
|
||||
m_temp = 0.0;
|
||||
|
||||
m_accelScale = 0.0;
|
||||
@ -68,7 +68,7 @@ LSM9DS0::LSM9DS0(int bus, bool raw, uint8_t gAddress, uint8_t xmAddress) :
|
||||
|
||||
if ( (rv = m_i2cXM.address(m_xmAddr)) != mraa::SUCCESS)
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Could not initialize XM i2c address");
|
||||
return;
|
||||
}
|
||||
@ -89,24 +89,24 @@ bool LSM9DS0::init()
|
||||
// power up
|
||||
if (!setGyroscopePowerDown(false))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to wake up gyro");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// enable all axes
|
||||
if (!setGyroscopeEnableAxes(CTRL_REG1_G_YEN |CTRL_REG1_G_XEN |
|
||||
CTRL_REG1_G_ZEN))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to enable gyro axes");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// set gyro ODR
|
||||
if (!setGyroscopeODR(G_ODR_95_25))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to set gyro ODR");
|
||||
return false;
|
||||
}
|
||||
@ -114,7 +114,7 @@ bool LSM9DS0::init()
|
||||
// set gyro scale
|
||||
if (!setGyroscopeScale(G_FS_245))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to set gyro scale");
|
||||
return false;
|
||||
}
|
||||
@ -124,7 +124,7 @@ bool LSM9DS0::init()
|
||||
// power up and set ODR
|
||||
if (!setAccelerometerODR(XM_AODR_100))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to set accel ODR");
|
||||
return false;
|
||||
}
|
||||
@ -133,35 +133,35 @@ bool LSM9DS0::init()
|
||||
if (!setAccelerometerEnableAxes(CTRL_REG1_XM_AXEN |CTRL_REG1_XM_AYEN |
|
||||
CTRL_REG1_XM_AZEN))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to enable accel axes");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// set scaling rate
|
||||
if (!setAccelerometerScale(XM_AFS_2))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to set accel scale");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// temperature sensor
|
||||
|
||||
// enable the temperature sensor
|
||||
if (!enableTemperatureSensor(true))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to enable temp sensor");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Init the magnetometer
|
||||
|
||||
|
||||
// set mode (this also powers it up if not XM_MD_POWERDOWN)
|
||||
if (!setMagnetometerMode(XM_MD_CONTINUOUS))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to set mag scale");
|
||||
return false;
|
||||
}
|
||||
@ -169,7 +169,7 @@ bool LSM9DS0::init()
|
||||
// turn LPM off
|
||||
if (!setMagnetometerLPM(false))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to disable mag LPM");
|
||||
return false;
|
||||
}
|
||||
@ -177,23 +177,23 @@ bool LSM9DS0::init()
|
||||
// set resolution
|
||||
if (!setMagnetometerResolution(XM_RES_LOW))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to set mag res");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// set ODR
|
||||
if (!setMagnetometerODR(XM_ODR_12_5))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to set mag ODR");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// set scale
|
||||
if (!setMagnetometerScale(XM_MFS_2))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to set mag scale");
|
||||
return false;
|
||||
}
|
||||
@ -293,7 +293,7 @@ uint8_t LSM9DS0::readReg(DEVICE_T dev, uint8_t reg)
|
||||
case DEV_GYRO: device = &m_i2cG; break;
|
||||
case DEV_XM: device = &m_i2cXM; break;
|
||||
default:
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
": Internal error, invalid device specified");
|
||||
return 0;
|
||||
}
|
||||
@ -310,7 +310,7 @@ void LSM9DS0::readRegs(DEVICE_T dev, uint8_t reg, uint8_t *buffer, int len)
|
||||
case DEV_GYRO: device = &m_i2cG; break;
|
||||
case DEV_XM: device = &m_i2cXM; break;
|
||||
default:
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
": Internal error, invalid device specified");
|
||||
return;
|
||||
}
|
||||
@ -329,7 +329,7 @@ bool LSM9DS0::writeReg(DEVICE_T dev, uint8_t reg, uint8_t val)
|
||||
case DEV_GYRO: device = &m_i2cG; break;
|
||||
case DEV_XM: device = &m_i2cXM; break;
|
||||
default:
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
": Internal error, invalid device specified");
|
||||
return false;
|
||||
}
|
||||
@ -340,8 +340,8 @@ bool LSM9DS0::writeReg(DEVICE_T dev, uint8_t reg, uint8_t val)
|
||||
throw std::runtime_error(std::string(__FUNCTION__) +
|
||||
": I2c.writeReg() failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -380,7 +380,7 @@ bool LSM9DS0::setGyroscopeODR(G_ODR_T odr)
|
||||
reg &= ~(_CTRL_REG1_G_ODR_MASK << _CTRL_REG1_G_ODR_SHIFT);
|
||||
|
||||
reg |= (odr << _CTRL_REG1_G_ODR_SHIFT);
|
||||
|
||||
|
||||
return writeReg(DEV_GYRO, REG_CTRL_REG1_G, reg);
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ bool LSM9DS0::setGyroscopeScale(G_FS_T scale)
|
||||
|
||||
default: // should never occur, but...
|
||||
m_gyroScale = 0.0; // set a safe, though incorrect value
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
": internal error, unsupported scale");
|
||||
break;
|
||||
}
|
||||
@ -446,7 +446,7 @@ bool LSM9DS0::setAccelerometerODR(XM_AODR_T odr)
|
||||
reg &= ~(_CTRL_REG1_XM_AODR_MASK << _CTRL_REG1_XM_AODR_SHIFT);
|
||||
|
||||
reg |= (odr << _CTRL_REG1_XM_AODR_SHIFT);
|
||||
|
||||
|
||||
return writeReg(DEV_XM, REG_CTRL_REG1_XM, reg);
|
||||
}
|
||||
|
||||
@ -464,11 +464,11 @@ bool LSM9DS0::setAccelerometerScale(XM_AFS_T scale)
|
||||
}
|
||||
|
||||
// store scaling factor
|
||||
|
||||
|
||||
switch (scale)
|
||||
{
|
||||
case XM_AFS_2:
|
||||
m_accelScale = 0.061;
|
||||
m_accelScale = 0.061;
|
||||
break;
|
||||
|
||||
case XM_AFS_4:
|
||||
@ -489,7 +489,7 @@ bool LSM9DS0::setAccelerometerScale(XM_AFS_T scale)
|
||||
|
||||
default: // should never occur, but...
|
||||
m_accelScale = 0.0; // set a safe, though incorrect value
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
": internal error, unsupported scale");
|
||||
break;
|
||||
}
|
||||
@ -504,7 +504,7 @@ bool LSM9DS0::setMagnetometerResolution(XM_RES_T res)
|
||||
reg &= ~(_CTRL_REG5_XM_RES_MASK << _CTRL_REG5_XM_RES_SHIFT);
|
||||
|
||||
reg |= (res << _CTRL_REG5_XM_RES_SHIFT);
|
||||
|
||||
|
||||
return writeReg(DEV_XM, REG_CTRL_REG5_XM, reg);
|
||||
}
|
||||
|
||||
@ -515,7 +515,7 @@ bool LSM9DS0::setMagnetometerODR(XM_ODR_T odr)
|
||||
reg &= ~(_CTRL_REG5_XM_ODR_MASK << _CTRL_REG5_XM_ODR_SHIFT);
|
||||
|
||||
reg |= (odr << _CTRL_REG5_XM_ODR_SHIFT);
|
||||
|
||||
|
||||
return writeReg(DEV_XM, REG_CTRL_REG5_XM, reg);
|
||||
}
|
||||
|
||||
@ -526,7 +526,7 @@ bool LSM9DS0::setMagnetometerMode(XM_MD_T mode)
|
||||
reg &= ~(_CTRL_REG7_XM_MD_MASK << _CTRL_REG7_XM_MD_SHIFT);
|
||||
|
||||
reg |= (mode << _CTRL_REG7_XM_MD_SHIFT);
|
||||
|
||||
|
||||
return writeReg(DEV_XM, REG_CTRL_REG7_XM, reg);
|
||||
}
|
||||
|
||||
@ -538,7 +538,7 @@ bool LSM9DS0::setMagnetometerLPM(bool enable)
|
||||
reg |= CTRL_REG7_XM_MLP;
|
||||
else
|
||||
reg &= ~CTRL_REG7_XM_MLP;
|
||||
|
||||
|
||||
return writeReg(DEV_XM, REG_CTRL_REG7_XM, reg);
|
||||
}
|
||||
|
||||
@ -556,7 +556,7 @@ bool LSM9DS0::setMagnetometerScale(XM_MFS_T scale)
|
||||
}
|
||||
|
||||
// store scaling factor
|
||||
|
||||
|
||||
switch (scale)
|
||||
{
|
||||
case XM_MFS_2:
|
||||
@ -577,7 +577,7 @@ bool LSM9DS0::setMagnetometerScale(XM_MFS_T scale)
|
||||
|
||||
default: // should never occur, but...
|
||||
m_magScale = 0.0; // set a safe, though incorrect value
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
": internal error, unsupported scale");
|
||||
break;
|
||||
}
|
||||
@ -741,22 +741,8 @@ uint8_t LSM9DS0::getInterruptGen2Src()
|
||||
return readReg(DEV_XM, REG_INT_GEN_2_SRC);
|
||||
}
|
||||
|
||||
#if defined(SWIGJAVA) || defined (JAVACALLBACK)
|
||||
|
||||
void LSM9DS0::installISR(INTERRUPT_PINS_T intr, int gpio, mraa::Edge level,
|
||||
jobject runnable)
|
||||
{
|
||||
// delete any existing ISR and GPIO context
|
||||
uninstallISR(intr);
|
||||
|
||||
// greate gpio context
|
||||
getPin(intr) = new mraa::Gpio(gpio);
|
||||
|
||||
getPin(intr)->dir(mraa::DIR_IN);
|
||||
getPin(intr)->isr(level, runnable);
|
||||
|
||||
}
|
||||
#else
|
||||
void LSM9DS0::installISR(INTERRUPT_PINS_T intr, int gpio, mraa::Edge level,
|
||||
void (*isr)(void *), void *arg)
|
||||
{
|
||||
// delete any existing ISR and GPIO context
|
||||
@ -768,7 +754,7 @@ void LSM9DS0::installISR(INTERRUPT_PINS_T intr, int gpio, mraa::Edge level,
|
||||
getPin(intr)->dir(mraa::DIR_IN);
|
||||
getPin(intr)->isr(level, isr, arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void LSM9DS0::uninstallISR(INTERRUPT_PINS_T intr)
|
||||
{
|
||||
@ -776,7 +762,7 @@ void LSM9DS0::uninstallISR(INTERRUPT_PINS_T intr)
|
||||
{
|
||||
getPin(intr)->isrExit();
|
||||
delete getPin(intr);
|
||||
|
||||
|
||||
getPin(intr) = 0;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
#define LSM9DS0_DEFAULT_GYRO_ADDR 0x6b
|
||||
|
||||
namespace upm {
|
||||
|
||||
|
||||
/**
|
||||
* @brief LSM9DS0 accelerometer library
|
||||
* @defgroup lsm9ds0 libupm-lsm9ds0
|
||||
@ -50,7 +50,7 @@ namespace upm {
|
||||
* @con i2c gpio
|
||||
* @web https://www.sparkfun.com/products/13033
|
||||
*
|
||||
* @brief API for the LSM9DS0 3-axis Gyroscope, Accelerometer,
|
||||
* @brief API for the LSM9DS0 3-axis Gyroscope, Accelerometer,
|
||||
* and Magnetometer
|
||||
*
|
||||
* The LSM9DS0 is a system-in-package featuring a 3D digital linear
|
||||
@ -109,13 +109,13 @@ namespace upm {
|
||||
|
||||
REG_STATUS_REG_G = 0x27,
|
||||
|
||||
REG_OUT_X_L_G = 0x28, // gyro output, X axis, LSB
|
||||
REG_OUT_X_H_G = 0x29, // gyro output, X axis, MSB
|
||||
REG_OUT_X_L_G = 0x28, // gyro output, X axis, LSB
|
||||
REG_OUT_X_H_G = 0x29, // gyro output, X axis, MSB
|
||||
REG_OUT_Y_L_G = 0x2a,
|
||||
REG_OUT_Y_H_G = 0x2b,
|
||||
REG_OUT_Z_L_G = 0x2c,
|
||||
REG_OUT_Z_H_G = 0x2d,
|
||||
|
||||
|
||||
REG_FIFO_CTRL_REG_G = 0x2e,
|
||||
REG_FIFO_SRC_REG_G = 0x2f,
|
||||
|
||||
@ -133,14 +133,14 @@ namespace upm {
|
||||
// on how to use this register
|
||||
REG_INT1_DURATION_G = 0x38
|
||||
} REG_G_T;
|
||||
|
||||
|
||||
/**
|
||||
* Gyro CTRL_REG1_G bits
|
||||
*/
|
||||
typedef enum {
|
||||
CTRL_REG1_G_YEN = 0x01, // Y enable, odd ordering...
|
||||
CTRL_REG1_G_XEN = 0x02,
|
||||
CTRL_REG1_G_ZEN = 0x04,
|
||||
CTRL_REG1_G_XEN = 0x02,
|
||||
CTRL_REG1_G_ZEN = 0x04,
|
||||
CTRL_REG1_G_PD = 0x08, // power down (0)
|
||||
|
||||
CTRL_REG1_G_BW0 = 0x10, // bandwidth
|
||||
@ -328,7 +328,7 @@ namespace upm {
|
||||
CTRL_REG5_G_BOOT = 0x80 // reboot memory content
|
||||
} CTRL_REG5_G_BITS_T;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* CRTL_REG5_G_OUTSEL and INT1SEL values. See Figure 18 in the
|
||||
* datasheet.
|
||||
@ -366,7 +366,7 @@ namespace upm {
|
||||
FIFO_CTRL_REG_G_WTM4 = 0x10,
|
||||
_FIFO_CTRL_REG_G_WTM_MASK = 31,
|
||||
_FIFO_CTRL_REG_G_WTM_SHIFT = 0,
|
||||
|
||||
|
||||
FIFO_CTRL_REG_G_FM0 = 0x20, // FIFO mode config
|
||||
FIFO_CTRL_REG_G_FM1 = 0x40,
|
||||
FIFO_CTRL_REG_G_FM2 = 0x80,
|
||||
@ -524,7 +524,7 @@ namespace upm {
|
||||
REG_TIME_LIMIT = 0x3b,
|
||||
REG_TIME_LATENCY = 0x3c,
|
||||
REG_TIME_WINDOW = 0x3d,
|
||||
|
||||
|
||||
REG_ACT_THS = 0x3e,
|
||||
REG_ACT_DUR = 0x3f
|
||||
} REG_XM_T;
|
||||
@ -552,7 +552,7 @@ namespace upm {
|
||||
INT_CTRL_REG_M_4D = 0x02,
|
||||
INT_CTRL_REG_M_IEL = 0x04, // latch intr request
|
||||
INT_CTRL_REG_M_IEA = 0x08,
|
||||
INT_CTRL_REG_M_PP_OD = 0x10, // push-pull/open drian
|
||||
INT_CTRL_REG_M_PP_OD = 0x10, // push-pull/open drian
|
||||
INT_CTRL_REG_M_ZMIEN = 0x20, // Z mag axis interrupt recognition
|
||||
INT_CTRL_REG_M_YMIEN = 0x40,
|
||||
INT_CTRL_REG_M_XMIEN = 0x80
|
||||
@ -600,7 +600,7 @@ namespace upm {
|
||||
CTRL_REG1_XM_BDU = 0x04, // block data update
|
||||
|
||||
CTRL_REG1_XM_AODR0 = 0x10, // accelerometer output data rate
|
||||
CTRL_REG1_XM_AODR1 = 0x20,
|
||||
CTRL_REG1_XM_AODR1 = 0x20,
|
||||
CTRL_REG1_XM_AODR2 = 0x40,
|
||||
CTRL_REG1_XM_AODR3 = 0x80,
|
||||
_CTRL_REG1_XM_AODR_MASK = 15,
|
||||
@ -624,7 +624,7 @@ namespace upm {
|
||||
XM_AODR_1000 = 10
|
||||
// 11-15 unused
|
||||
} XM_AODR_T;
|
||||
|
||||
|
||||
/**
|
||||
* CTRL_REG2_XM bits
|
||||
*/
|
||||
@ -740,7 +740,7 @@ namespace upm {
|
||||
XM_ODR_25 = 3,
|
||||
XM_ODR_50 = 4,
|
||||
XM_ODR_100 = 5
|
||||
|
||||
|
||||
// 6, 7 reserved
|
||||
} XM_ODR_T;
|
||||
|
||||
@ -749,9 +749,9 @@ namespace upm {
|
||||
*/
|
||||
typedef enum {
|
||||
XM_RES_LOW = 0, // low resolution
|
||||
|
||||
|
||||
// 1, 2 reserved
|
||||
|
||||
|
||||
XM_RES_HIGH = 3,
|
||||
} XM_RES_T;
|
||||
|
||||
@ -850,7 +850,7 @@ namespace upm {
|
||||
FIFO_CTRL_REG_FTH4 = 0x10,
|
||||
_FIFO_CTRL_REG_FTH_MASK = 31,
|
||||
_FIFO_CTRL_REG_FTH_SHIFT = 0,
|
||||
|
||||
|
||||
FIFO_CTRL_REG_FM0 = 0x20, // FIFO mode config
|
||||
FIFO_CTRL_REG_FM1 = 0x40,
|
||||
FIFO_CTRL_REG_FM2 = 0x80,
|
||||
@ -970,7 +970,7 @@ namespace upm {
|
||||
CLICK_CONFIG_ZD = 0x20
|
||||
// 0x40, 0x80 reserved
|
||||
} CLICK_CONFIG_BITS_T;
|
||||
|
||||
|
||||
/**
|
||||
* CLICK_SRC bits
|
||||
*
|
||||
@ -1072,7 +1072,7 @@ namespace upm {
|
||||
* LSM9DS0 Destructor
|
||||
*/
|
||||
~LSM9DS0();
|
||||
|
||||
|
||||
/**
|
||||
* set up initial values and start operation
|
||||
*
|
||||
@ -1416,10 +1416,7 @@ namespace upm {
|
||||
*/
|
||||
uint8_t getInterruptGen2Src();
|
||||
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(INTERRUPT_PINS_T intr, int gpio, mraa::Edge level,
|
||||
jobject runnable);
|
||||
#else
|
||||
|
||||
/**
|
||||
* install an interrupt handler.
|
||||
*
|
||||
@ -1432,9 +1429,9 @@ namespace upm {
|
||||
* @param isr the interrupt handler, accepting a void * argument
|
||||
* @param arg the argument to pass the the interrupt handler
|
||||
*/
|
||||
void installISR(INTERRUPT_PINS_T intr, int gpio, mraa::Edge level,
|
||||
void installISR(INTERRUPT_PINS_T intr, int gpio, mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* uninstall a previously installed interrupt handler
|
||||
*
|
||||
@ -1486,5 +1483,3 @@ namespace upm {
|
||||
mraa::Gpio *m_gpioXM_GEN2;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user