eive-obsw/linux/obc/PtmeRateSetter.h

39 lines
1.1 KiB
C
Raw Normal View History

2021-11-21 18:07:05 +01:00
#ifndef LINUX_OBC_PTMERATESETTER_H_
#define LINUX_OBC_PTMERATESETTER_H_
#include "TxRateSetterIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
2022-01-18 11:41:19 +01:00
#include "fsfw_hal/common/gpio/GpioIF.h"
#include "fsfw_hal/common/gpio/gpioDefinitions.h"
2021-11-21 18:07:05 +01:00
/**
* @brief Class to set the downlink bit rate by using the cadu_rate_switcher implemented in
* the programmable logic.
*
* @details The cadu_rate_switcher module sets the input rate to the syrlinks transceiver either
* to 2000 kHz (bitrateSel = 1) or 400 kHz (bitrate = 0).
*
* @author J. Meier
*/
2022-01-18 11:41:19 +01:00
class PtmeRateSetter : public TxRateSetterIF {
public:
/**
* @brief Constructor
*
* @param bitrateSel GPIO ID of the GPIO connected to the bitrate_sel input of the
* cadu_rate_switcher.
* @param gpioif GPIO interface to drive the bitrateSel GPIO
*/
PtmeRateSetter(gpioId_t bitrateSel, GpioIF* gpioif);
virtual ~PtmeRateSetter();
virtual ReturnValue_t setRate(BitRates rate);
private:
gpioId_t bitrateSel = gpio::NO_GPIO;
GpioIF* gpioif = nullptr;
2021-11-21 18:07:05 +01:00
};
#endif /* LINUX_OBC_PTMERATESETTER_H_ */