Skip to content

Commit f550526

Browse files
committed
[onu-status] Fix address whoops
1 parent 603e8f5 commit f550526

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Cru/Ttc.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ bool Ttc::configurePonTx(uint32_t onuAddress)
139139

140140
Cru::OnuStatus Ttc::onuStatus()
141141
{
142-
uint32_t calStatus = mPdaBar->readRegister(Cru::Registers::ONU_USER_LOGIC.index) + 0xc;
142+
uint32_t calStatus = mPdaBar->readRegister(Cru::Registers::ONU_USER_LOGIC.index + 0xc / 4);
143143
uint32_t onuAddress = mPdaBar->readRegister(Cru::Registers::ONU_USER_LOGIC.index) >> 1;
144144

145145
Cru::OnuStatus onuStatus = {
@@ -153,6 +153,7 @@ Cru::OnuStatus Ttc::onuStatus()
153153
calStatus >> 6 & 0x1,
154154
calStatus >> 7 & 0x1
155155
};
156+
156157
return onuStatus;
157158
}
158159

0 commit comments

Comments
 (0)