applied clanf formatting
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Jakob Meier
2022-01-31 08:09:58 +01:00
parent c1726f897b
commit 1651926efa
8 changed files with 28 additions and 33 deletions

View File

@ -109,8 +109,8 @@ ReturnValue_t AxiPtmeConfig::writeBit(uint32_t regOffset, bool bitVal, BitPos bi
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
uint32_t writeVal = (readVal & ~(1 << static_cast<uint32_t>(bitPos))) |
bitVal << static_cast<uint32_t>(bitPos);
uint32_t writeVal =
(readVal & ~(1 << static_cast<uint32_t>(bitPos))) | bitVal << static_cast<uint32_t>(bitPos);
result = writeReg(regOffset, writeVal);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;

View File

@ -58,10 +58,7 @@ class AxiPtmeConfig : public SystemObject {
static const uint32_t COMMON_CONFIG_REG = 0x4;
static const uint32_t ADRESS_DIVIDER = 4;
enum class BitPos : uint32_t {
EN_TX_CLK_MANIPULATOR,
INVERT_CLOCK
};
enum class BitPos : uint32_t { EN_TX_CLK_MANIPULATOR, INVERT_CLOCK };
std::string axiUio;
std::string uioMap;

View File

@ -27,26 +27,24 @@ ReturnValue_t PtmeConfig::setRate(uint32_t bitRate) {
}
ReturnValue_t PtmeConfig::invertTxClock(bool invert) {
ReturnValue_t result = RETURN_OK;
if (invert) {
result = axiPtmeConfig->enableTxclockInversion();
}
else {
result = axiPtmeConfig->disableTxclockInversion();
}
if (result != RETURN_OK) {
return CLK_INVERSION_FAILED;
}
return result;
ReturnValue_t result = RETURN_OK;
if (invert) {
result = axiPtmeConfig->enableTxclockInversion();
} else {
result = axiPtmeConfig->disableTxclockInversion();
}
if (result != RETURN_OK) {
return CLK_INVERSION_FAILED;
}
return result;
}
ReturnValue_t PtmeConfig::configTxManipulator(bool enable) {
ReturnValue_t result = RETURN_OK;
if (enable) {
result = axiPtmeConfig->enableTxclockManipulator();
}
else {
result = axiPtmeConfig->disableTxclockManipulator();
}
return result;
ReturnValue_t result = RETURN_OK;
if (enable) {
result = axiPtmeConfig->enableTxclockManipulator();
} else {
result = axiPtmeConfig->disableTxclockManipulator();
}
return result;
}

View File

@ -1,10 +1,10 @@
#ifndef LINUX_OBC_PTMECONFIG_H_
#define LINUX_OBC_PTMECONFIG_H_
#include "AxiPtmeConfig.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "linux/obc/PtmeConfig.h"
#include "AxiPtmeConfig.h"
/**
* @brief Class to configure donwlink specific parameters in the PTME IP core.
@ -59,10 +59,11 @@ class PtmeConfig : public SystemObject, public HasReturnvaluesIF {
static const ReturnValue_t RATE_NOT_SUPPORTED = MAKE_RETURN_CODE(0xA0);
//! [EXPORT] : [COMMENT] Bad bitrate has been commanded (e.g. 0)
static const ReturnValue_t BAD_BIT_RATE = MAKE_RETURN_CODE(0xA1);
//! [EXPORT] : [COMMENT] Failed to invert clock and thus change the time the data is updated with respect to the tx clock
//! [EXPORT] : [COMMENT] Failed to invert clock and thus change the time the data is updated with
//! respect to the tx clock
static const ReturnValue_t CLK_INVERSION_FAILED = MAKE_RETURN_CODE(0xA2);
//! [EXPORT] : [COMMENT] Failed to change configuration bit of tx clock manipulator
static const ReturnValue_t TX_MANIPULATOR_CONFIG_FAILED = MAKE_RETURN_CODE(0xA3);
static const ReturnValue_t TX_MANIPULATOR_CONFIG_FAILED = MAKE_RETURN_CODE(0xA3);
// Bitrate register field is only 8 bit wide
static const uint32_t MAX_BITRATE = 0xFF;