poll threshold param cmd handling
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...
This commit is contained in:
@ -89,14 +89,12 @@ AxiPtmeConfig::IdlePollThreshold AxiPtmeConfig::readPollThreshold() {
|
||||
return static_cast<AxiPtmeConfig::IdlePollThreshold>((regVal >> 3) & 0b111);
|
||||
}
|
||||
|
||||
void AxiPtmeConfig::writeCommonCfgReg(uint32_t value) { writeReg(COMMON_CONFIG_REG, value); }
|
||||
uint32_t AxiPtmeConfig::readCommonCfgReg() { return readReg(COMMON_CONFIG_REG); }
|
||||
|
||||
void AxiPtmeConfig::writeBit(uint32_t regOffset, bool bitVal, BitPos bitPos) {
|
||||
uint32_t readVal = readReg(regOffset);
|
||||
uint32_t writeVal =
|
||||
(readVal & ~(1 << static_cast<uint32_t>(bitPos))) | bitVal << static_cast<uint32_t>(bitPos);
|
||||
writeReg(regOffset, writeVal);
|
||||
}
|
||||
|
||||
uint32_t AxiPtmeConfig::readCommonCfgReg() {
|
||||
MutexGuard mg(mutex, timeoutType, mutexTimeout);
|
||||
return *(baseAddress + COMMON_CONFIG_REG / ADRESS_DIVIDER);
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ class AxiPtmeConfig : public SystemObject {
|
||||
uint32_t readReg(uint32_t regOffset);
|
||||
|
||||
uint32_t readCommonCfgReg();
|
||||
uint32_t writeCommonCfgReg(uint32_t value);
|
||||
void writeCommonCfgReg(uint32_t value);
|
||||
|
||||
/**
|
||||
* @brief Sets one bit in a register
|
||||
|
@ -49,3 +49,7 @@ void PtmeConfig::enableBatPriorityBit(bool enable) {
|
||||
axiPtmeConfig->disableBatPriorityBit();
|
||||
}
|
||||
}
|
||||
|
||||
void PtmeConfig::setPollThreshold(AxiPtmeConfig::IdlePollThreshold pollThreshold) {
|
||||
axiPtmeConfig->writePollThreshold(pollThreshold);
|
||||
}
|
||||
|
@ -64,6 +64,8 @@ class PtmeConfig : public SystemObject {
|
||||
*/
|
||||
void enableBatPriorityBit(bool enable);
|
||||
|
||||
void setPollThreshold(AxiPtmeConfig::IdlePollThreshold pollThreshold);
|
||||
|
||||
private:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::RATE_SETTER;
|
||||
|
||||
|
Reference in New Issue
Block a user