1 %module jsupm_zfm20
2 %include "../upm.i"
3 %include "../carrays_uint16_t.i"
4 %include "../carrays_uint32_t.i"
5 %include "cpointer.i"
6 
7 %typemap(in) uint16_t * {
8   void *argp = 0 ;
9   int res = SWIG_ConvertPtr($input, &argp,SWIGTYPE_p_uint16Array, 0 |  0 );
10   $1 = (uint16_t *)(argp);
11 }
12 
13 /*$input is a v8::object, which inherits from v8::value */
14 %typemap(in) uint32_t {
15    $1 = ($input)->Uint32Value();
16 }
17 
18 /* Send "int *" to JavaScript as intp */
19 %pointer_functions(int, intp);
20 %{
21     #include "zfm20.h"
22     speed_t int_B57600 = B57600;
23 %}
24 
25 %include "zfm20.h"
26 speed_t int_B57600 = B57600;
27