projet_voilier/keil_project/Services/RFInput.h
2020-11-15 18:21:34 +01:00

38 lines
1.1 KiB
C

/**
******************************************************************************
* @file RFInput.h
* @author CAVAILLES, Kevin and GÜLDENSTEIN, Jasper
* @brief Service for reading a PWM signal from an RF remote
******************************************************************************
*/
#ifndef RF_INPUT_H
#define RF_INPUT_H
/**
* @brief Initialziation function for the RF_INPUT module.
* Peripherals used: TIM4
* Pins used: PB6 (PWM Input)
*/
void RF_INPUT_Init(void);
/**
* @brief Reads the period of the PWM signal
* @retval period of the PWM signal in microseconds (10^(-6))
*/
int RF_INPUT_GetPeriodUs(void);
/**
* @brief Reads the length of the active time of the PWM signal
* @retval active time of the PWM signal in microseconds (10^(-6))
*/
int RF_INPUT_GetDutyTimeUs(void);
/**
* @brief Reads the length of the active time of the PWM signal and converts it to a relative value
* @retval value between -100 corresponding to 1000us and 100 corresponding to 2000us active time of the PWM signal
*/
int RF_INPUT_GetDutyTimeRelative(void);
#endif