Read Rx digital RSSI value

unsigned long GetRSSI()
{
unsgined long msbReg, lsbReg;
// Trigger rising edge of RSSI capture:
LMS7002M_WR(0x0400, 0x0081);
delay (50);
LMS7002M_WR(0x0400, 0x8081);
msbReg = LMS7002M_RD(0x040F);
lsbReg = LMS7002M_RD(0x040E);
return (msbReg << 2) | (lsbReg & 0x3);
}

1 Like