/**
* @file pin_test.c
- * @purpose Implementations to allow direct control over pins through FastCGI
+ * @brief Implementations to allow direct control over pins through FastCGI
*/
#include "pin_test.h"
ADC_Unexport(i);
for (int i = 0; i < PWM_NUM_PINS; ++i)
- PWM_Unexport(g_pin_safe_pwm[i]);
+ PWM_Unexport(i);
}
bool Pin_Configure(const char *type, int pin_export, int num)
}
else if (strcmp(type, "pwm") == 0)
{
- if (num < 0 || num >= PWM_NUM_SAFE_PINS)
+ if (num < 0 || num >= PWM_NUM_PINS)
{
FCGI_RejectJSON(context, "Invalid PWM pin");
return;
else
{
Log(LOGDEBUG, "Stopping PWM%d",num);
- PWM_Stop(g_pin_safe_pwm[num]);
+ PWM_Stop(num);
FCGI_PrintRaw("Content-type: text/plain\r\n\r\n");
FCGI_PrintRaw("PWM%d stopped",num);
}
FCGI_RejectJSON(context, "Invalid pin type");
}
-}
\ No newline at end of file
+}