eive-obsw/linux/obc/PtmeAxiConfig.h

43 lines
1.2 KiB
C
Raw Normal View History

2022-01-24 07:43:14 +01:00
#ifndef LINUX_OBC_PTMEAXICONFIG_H_
#define LINUX_OBC_PTMEAXICONFIG_H_
#include <string>
2022-01-26 17:59:31 +01:00
2022-01-24 07:43:14 +01:00
#include "fsfw/ipc/MutexIF.h"
#include "fsfw/objectmanager/SystemObject.h"
2022-01-26 17:59:31 +01:00
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
2022-01-24 07:43:14 +01:00
/**
* @brief Class providing low level access to the configuration interface of the PTME.
*
* @author J. Meier
*/
class PtmeAxiConfig : public SystemObject {
2022-01-26 17:59:31 +01:00
public:
/**
* @brief Constructor
* @param configAxiUio Device file of UIO belonging to the AXI configuration interface.
* @param mapNum Number of map belonging to axi configuration interface.
*/
PtmeAxiConfig(object_id_t objectId, std::string configAxiUio, int mapNum);
virtual ~PtmeAxiConfig();
virtual ReturnValue_t initialize() override;
ReturnValue_t writeCaduRateReg(uint8_t rateVal);
private:
// Address of register storing the bitrate configuration parameter
static const uint32_t CADU_BITRATE_REG = 0x0;
std::string configAxiUio;
std::string uioMap;
int mapNum = 0;
MutexIF* mutex = nullptr;
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
uint32_t mutexTimeout = 20;
uint32_t* baseAddress = nullptr;
2022-01-24 07:43:14 +01:00
};
#endif /* LINUX_OBC_PTMEAXICONFIG_H_ */