chiark / gitweb /
wiringpi: much implementation, now it links
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 8 Jun 2016 01:46:43 +0000 (02:46 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 8 Jun 2016 01:46:43 +0000 (02:46 +0100)
wiringpi/wiringpi.c

index 3b6348d..eaf05eb 100644 (file)
@@ -137,7 +137,7 @@ int cht_do_wiringpitcl_boardId(ClientData cd, Tcl_Interp *ip,
            &ints[3],
            &ints[4]);
   int i;
            &ints[3],
            &ints[4]);
   int i;
-  for (i=0; i<N; i++) objl[i]= Tcl_NewIntObj(ints[i]);
+  for (i=0; i<N; i++) objl[i]= cht_ret_int(ip, ints[i]);
   *result= Tcl_NewListObj(N,objl);
   return TCL_OK;
 #undef N
   *result= Tcl_NewListObj(N,objl);
   return TCL_OK;
 #undef N
@@ -163,6 +163,18 @@ int cht_do_wiringpitcl_pwmr(ClientData cd, Tcl_Interp *ip, int range) {
   return TCL_OK;
 }
 
   return TCL_OK;
 }
 
+int cht_do_wiringpitcl_pwm_bal(ClientData cd, Tcl_Interp *ip) {
+  CHECK_SETUP;
+  pwmSetMode(PWM_MODE_BAL);
+  return TCL_OK;
+}
+
+int cht_do_wiringpitcl_pwm_ms(ClientData cd, Tcl_Interp *ip) {
+  CHECK_SETUP;
+  pwmSetMode(PWM_MODE_MS);
+  return TCL_OK;
+}
+
 /*---------- families of operations ----------*/
 
 #define SIMPLE_READER_OP(op, wpicall)                          \
 /*---------- families of operations ----------*/
 
 #define SIMPLE_READER_OP(op, wpicall)                          \