1 %module jsupm_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 = (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 = (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 = (uint32_t *)(argp); 25 } 26 27 %{ 28 #include "hmtrp.h" 29 speed_t int_B9600 = B9600; 30 %} 31 32 %include "hmtrp.h" 33 speed_t int_B9600 = B9600; 34 %array_class(char, charArray); 35