+/*---------- families of operations ----------*/
+
+#define SIMPLE_READER_OP(op, wpicall) \
+ int cht_do_wiringpitcl_##op(ClientData cd, Tcl_Interp *ip, \
+ int pin, int *result) { \
+ CHECK_SETUP; \
+ *result = wpicall(pin); \
+ return TCL_OK; \
+ }
+
+SIMPLE_READER_OP(read, digitalRead)
+SIMPLE_READER_OP(aread, analogRead)
+