#include "RFReceiver.h"

void RFReceiver_conf(TIM_TypeDef * timer, int channel)
{
	PWMi_conf(timer, channel);
}

float RFReceiver_getData(TIM_TypeDef * timer)
{
	const int duty_cycle = PWMi_getDutyCycle(timer);
	const int period = PWMi_getPeriod(timer);
	const float duree_impulsion = duty_cycle * period;
	
	return (duree_impulsion -1) * 200 - 100;
}
