2016-03-01 20:10:17 +01:00
|
|
|
%module jsupm_apa102
|
|
|
|
|
|
|
|
|
|
%include "../upm.i"
|
|
|
|
|
%inline %{
|
|
|
|
|
#include <node_buffer.h>
|
|
|
|
|
%}
|
|
|
|
|
|
|
|
|
|
%typemap(in) (uint8_t *colors) {
|
|
|
|
|
if (!node::Buffer::HasInstance($input)) {
|
|
|
|
|
SWIG_exception_fail(SWIG_ERROR, "Expected a node Buffer");
|
|
|
|
|
}
|
|
|
|
|
$1 = (uint8_t*) node::Buffer::Data($input);
|
|
|
|
|
}
|
|
|
|
|
|
2016-04-25 14:27:51 -07:00
|
|
|
%include "apa102.hpp"
|
2016-03-01 20:10:17 +01:00
|
|
|
|
|
|
|
|
%{
|
2016-04-25 14:27:51 -07:00
|
|
|
#include "apa102.hpp"
|
2016-03-01 20:10:17 +01:00
|
|
|
%}
|