APA102: Initial implementation
Signed-off-by: Yannick Adam <yannick.adam@gmail.com> Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
25
src/apa102/pyupm_apa102.i
Normal file
25
src/apa102/pyupm_apa102.i
Normal file
@@ -0,0 +1,25 @@
|
||||
// Include doxygen-generated documentation
|
||||
%include "pyupm_doxy2swig.i"
|
||||
|
||||
%module pyupm_apa102
|
||||
|
||||
%include "../upm.i"
|
||||
|
||||
%feature("autodoc", "3");
|
||||
|
||||
// setLeds
|
||||
%typemap(in) (uint8_t *colors) {
|
||||
if (PyByteArray_Check($input)) {
|
||||
$1 = (uint8_t*) PyByteArray_AsString($input);
|
||||
} else {
|
||||
PyErr_SetString(PyExc_ValueError, "bytearray expected");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
%include "apa102.h"
|
||||
|
||||
%{
|
||||
|
||||
#include "apa102.h"
|
||||
%}
|
||||
Reference in New Issue
Block a user