1 %module pyupm_hmtrp 2 %include "../upm.i" 3 %include "../carrays_uint8_t.i" 4 %include "../carrays_uint16_t.i" 5 %include "../carrays_uint32_t.i" 6 7 // Adding this typemap because SWIG is converting uint8, uint16, and uint32 into a short by default 8 // This forces SWIG to convert it correctly 9 %typemap(in) uint8_t * { 10 void *argp = 0 ; 11 int res = SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_uint8Array, 0 | 0 ); 12 $1 = reinterpret_cast< uint8_t * >(argp); 13 } 14 15 %typemap(in) uint16_t * { 16 void *argp = 0 ; 17 int res = SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_uint16Array, 0 | 0 ); 18 $1 = reinterpret_cast< uint16_t * >(argp); 19 } 20 21 %typemap(in) uint32_t * { 22 void *argp = 0 ; 23 int res = SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_uint32Array, 0 | 0 ); 24 $1 = reinterpret_cast< uint32_t * >(argp); 25 } 26 27 %feature("autodoc", "3"); 28 29 %include "hmtrp.h" 30 %{ 31 #include "hmtrp.h" 32 speed_t int_B9600 = B9600; 33 %} 34 speed_t int_B9600 = B9600; 35 %array_class(char, charArray); 36