Only reset PTME on rate change #716
@ -16,9 +16,9 @@ AxiPtmeConfig::AxiPtmeConfig(object_id_t objectId, std::string axiUio, int mapNu
|
|||||||
AxiPtmeConfig::~AxiPtmeConfig() {}
|
AxiPtmeConfig::~AxiPtmeConfig() {}
|
||||||
|
|
||||||
ReturnValue_t AxiPtmeConfig::initialize() {
|
ReturnValue_t AxiPtmeConfig::initialize() {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
UioMapper uioMapper(axiUio, mapNum);
|
UioMapper uioMapper(axiUio, mapNum);
|
||||||
result = uioMapper.getMappedAdress(&baseAddress, UioMapper::Permissions::READ_WRITE);
|
ReturnValue_t result =
|
||||||
|
uioMapper.getMappedAdress(&baseAddress, UioMapper::Permissions::READ_WRITE);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -26,8 +26,7 @@ ReturnValue_t AxiPtmeConfig::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t AxiPtmeConfig::writeCaduRateReg(uint8_t rateVal) {
|
ReturnValue_t AxiPtmeConfig::writeCaduRateReg(uint8_t rateVal) {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = mutex->lockMutex(timeoutType, mutexTimeout);
|
||||||
result = mutex->lockMutex(timeoutType, mutexTimeout);
|
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "AxiPtmeConfig::writeCaduRateReg: Failed to lock mutex" << std::endl;
|
sif::warning << "AxiPtmeConfig::writeCaduRateReg: Failed to lock mutex" << std::endl;
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
@ -42,7 +41,6 @@ ReturnValue_t AxiPtmeConfig::writeCaduRateReg(uint8_t rateVal) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t AxiPtmeConfig::readCaduRateReg() {
|
uint8_t AxiPtmeConfig::readCaduRateReg() {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(mutex);
|
||||||
return static_cast<uint8_t>(*(baseAddress + CADU_BITRATE_REG));
|
return static_cast<uint8_t>(*(baseAddress + CADU_BITRATE_REG));
|
||||||
|
|||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user
but why
why indeed