Robin Mueller
5cc7331e90
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
#ifndef LINUX_OBC_PTMERATESETTER_H_
|
|
#define LINUX_OBC_PTMERATESETTER_H_
|
|
|
|
#include "TxRateSetterIF.h"
|
|
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
|
#include "fsfw_hal/common/gpio/GpioIF.h"
|
|
#include "fsfw_hal/common/gpio/gpioDefinitions.h"
|
|
|
|
/**
|
|
* @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
|
|
*/
|
|
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;
|
|
};
|
|
|
|
#endif /* LINUX_OBC_PTMERATESETTER_H_ */
|