]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
added trb_set_address function
authorhadaq <hadaq>
Sat, 25 Aug 2012 00:21:52 +0000 (00:21 +0000)
committerhadaq <hadaq>
Sat, 25 Aug 2012 00:21:52 +0000 (00:21 +0000)
libtrbnet_perl/TrbNet.xs

index 044c412df2b6453dd9b00784bc3c72f535ecee1f..5873cbc26c6bdf7320e30b3f44c9f12878d239ac 100644 (file)
@@ -3,6 +3,7 @@
 #include <XSUB.h>
 #include <assert.h>
 #include <string.h>
+#include <uconfig.h>
 
 #include <trbnet.h>
 #include <trberror.h>
@@ -211,3 +212,20 @@ trb_register_modify(trb_address, reg_address, mode, bitMask, bitValue)
      } else {
        XPUSHs(sv_2mortal(newSVuv(1)));
      }
+
+
+void
+trb_set_address(uid, endpoint, trb_address)
+     U32  uid
+     U8 endpoint
+     U16 trb_address
+   INIT:
+     int status;
+        
+   PPCODE:
+     status =  trb_set_address(uid, endpoint, trb_address);
+     if (status < 0) {
+       XSRETURN_UNDEF;
+     } else {
+       XPUSHs(sv_2mortal(newSVuv(1)));
+     }