2014-12-02 23:20:24 +00:00
|
|
|
%rename("%(strip:[MRAA_])s", %$isenumitem) "";
|
|
|
|
|
|
2014-07-01 13:51:03 +01:00
|
|
|
%include stdint.i
|
2014-07-04 15:42:04 +01:00
|
|
|
%include std_string.i
|
2014-10-16 14:53:56 +01:00
|
|
|
%include exception.i
|
2014-06-24 14:41:00 +01:00
|
|
|
|
2014-05-30 10:28:21 +01:00
|
|
|
#ifdef DOXYGEN
|
2014-07-04 15:42:04 +01:00
|
|
|
%include common_hpp_doc.i
|
2014-05-30 10:28:21 +01:00
|
|
|
%include gpio_class_doc.i
|
|
|
|
|
%include i2c_class_doc.i
|
|
|
|
|
%include pwm_class_doc.i
|
|
|
|
|
%include aio_class_doc.i
|
|
|
|
|
%include spi_class_doc.i
|
2014-09-03 09:30:49 +01:00
|
|
|
%include uart_class_doc.i
|
2014-05-30 10:28:21 +01:00
|
|
|
#endif
|
|
|
|
|
|
2014-04-10 16:53:19 +01:00
|
|
|
%{
|
2014-07-04 15:42:04 +01:00
|
|
|
#include "common.hpp"
|
2014-05-16 11:56:06 +01:00
|
|
|
#include "gpio.hpp"
|
2014-05-16 11:53:19 +01:00
|
|
|
#include "pwm.hpp"
|
2014-05-16 10:28:26 +01:00
|
|
|
#include "i2c.hpp"
|
2014-05-16 14:10:29 +01:00
|
|
|
#include "spi.hpp"
|
2014-05-15 22:47:38 +01:00
|
|
|
#include "aio.hpp"
|
2014-09-03 09:30:49 +01:00
|
|
|
#include "uart.hpp"
|
2014-04-10 16:53:19 +01:00
|
|
|
%}
|
|
|
|
|
|
2014-05-07 17:39:58 +01:00
|
|
|
%init %{
|
2014-06-24 17:24:54 +01:00
|
|
|
//Adding mraa_init() to the module initialisation process
|
|
|
|
|
mraa_init();
|
2014-05-07 17:39:58 +01:00
|
|
|
%}
|
|
|
|
|
|
2014-10-16 14:53:56 +01:00
|
|
|
%exception {
|
|
|
|
|
try {
|
|
|
|
|
$action
|
|
|
|
|
} catch(const std::invalid_argument& e) {
|
|
|
|
|
SWIG_exception(SWIG_ValueError, e.what());
|
|
|
|
|
} catch(...) {
|
|
|
|
|
SWIG_exception(SWIG_RuntimeError, "Unknown exception");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-04 15:42:04 +01:00
|
|
|
%include "common.hpp"
|
|
|
|
|
|
2014-06-20 18:00:19 +01:00
|
|
|
%include "types.h"
|
|
|
|
|
|
2015-02-18 14:27:50 +00:00
|
|
|
%ignore Gpio::nop(uv_work_t* req);
|
|
|
|
|
%ignore Gpio::v8isr(uv_work_t* req);
|
|
|
|
|
%ignore Gpio::v8isr(uv_work_t* req, int status);
|
|
|
|
|
%ignore Gpio::uvwork(void *ctx);
|
|
|
|
|
|
2014-05-16 11:56:06 +01:00
|
|
|
%include "gpio.hpp"
|
2014-05-01 15:42:42 +01:00
|
|
|
|
2014-05-16 10:28:26 +01:00
|
|
|
%include "i2c.hpp"
|
2014-05-01 15:42:42 +01:00
|
|
|
|
2014-05-16 11:53:19 +01:00
|
|
|
%include "pwm.hpp"
|
2014-05-01 15:42:42 +01:00
|
|
|
|
2014-05-16 14:10:29 +01:00
|
|
|
%include "spi.hpp"
|
2014-05-01 16:59:54 +01:00
|
|
|
|
2014-05-15 22:47:38 +01:00
|
|
|
%include "aio.hpp"
|
2014-09-03 09:30:49 +01:00
|
|
|
|
|
|
|
|
%include "uart.hpp"
|