- Log(LOGDEBUG, "Params: type = %s, num = %d, set = %d, pol = %d, freq = %f, duty = %f", type, num, set, pol, freq, duty);
+ Log(LOGDEBUG, "Params: type = %s, num = %d, export = %d, set = %d, pol = %d, freq = %f, duty = %f", type, num, pin_export, set, pol, freq, duty);
+ if (pin_export != 0)
+ {
+ if (!Pin_Configure(type, pin_export, num))
+ {
+ FCGI_RejectJSON(context, "Failed to (un)export the pin. Check that a valid number has been specified.");
+ return;
+ }
+ FCGI_BeginJSON(context, STATUS_OK);
+ FCGI_JSONPair("description", "Pin (un)export OK!");
+ FCGI_EndJSON();
+ return;
+ }