Skip to content

Commit

Permalink
comments for registers
Browse files Browse the repository at this point in the history
  • Loading branch information
manu committed Sep 21, 2023
1 parent a3e3b30 commit 0deb234
Show file tree
Hide file tree
Showing 2 changed files with 497 additions and 82 deletions.
14 changes: 4 additions & 10 deletions app/userapp_ranking.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ static void ResetRSSI() {
BK4819_WriteRegister(BK4819_REG_30, Reg);
}


uint8_t GetRssi() {
SYSTICK_DelayUs(10);
int32_t rssi = (BK4819_GetRSSI() >> 1);
rssi -= 160;
rssi *= (-1);
return rssi & 0xFF;
}

void setF(uint32_t f) {
BK4819_PickRXFilterPathBasedOnFrequency(f);
BK4819_SetFrequency(f);
Expand All @@ -74,7 +65,10 @@ void USERAPP_ranking_readChannelFreq(uint8_t rssi_val[200]) {
ResetRSSI();
SYSTEM_DelayMs(10);

rssi_val[channel] = GetRssi();
int32_t rssi = (BK4819_GetRSSI() >> 1);
rssi -= 160;
rssi *= (-1);
rssi_val[channel] = rssi & 0xFF;

USERAPPS_ranking_progress(channel / 2);

Expand Down
Loading

0 comments on commit 0deb234

Please sign in to comment.