Skip to content

Commit

Permalink
mraa.i: Swig interface options to ignore the void* IO constructors an…
Browse files Browse the repository at this point in the history
…d pre-initialise the c++ template functions

Signed-off-by: Houman Brinjcargorabi <[email protected]>
Signed-off-by: Brendan Le Foll <[email protected]>
  • Loading branch information
Houman brinjcargorabi authored and arfoll committed May 24, 2016
1 parent b6e6374 commit a321d67
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/mraa.i
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@
%include "types.hpp"

%include "common.hpp"
%template (gpioFromDesc) mraa::initIo<mraa::Gpio>;
%template (aioFromDesc) mraa::initIo<mraa::Aio>;
%template (uartFromDesc) mraa::initIo<mraa::Uart>;
%template (spiFromDesc) mraa::initIo<mraa::Spi>;
%template (i2cFromDesc) mraa::initIo<mraa::I2c>;
%template (pwmFromDesc) mraa::initIo<mraa::Pwm>;

%ignore Aio(void* aio_context);
%ignore Pwm(void* pwm_context);
%ignore Uart(void* uart_context);
%ignore Spi(void* spi_context);
%ignore I2c(void* i2c_context);
%ignore Gpio(void* gpio_context);

%ignore Gpio::nop(uv_work_t* req);
%ignore Gpio::v8isr(uv_work_t* req);
Expand Down

0 comments on commit a321d67

Please sign in to comment.