forked from mirror/uv-k5-firmware
Added remaining known BK1080 features.
This commit is contained in:
parent
e8a0cd37de
commit
f5af8df760
@ -19,6 +19,7 @@
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/i2c.h"
|
||||
#include "driver/system.h"
|
||||
#include "misc.h"
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
@ -102,3 +103,10 @@ void BK1080_SetFrequency(uint16_t Frequency)
|
||||
BK1080_WriteRegister(BK1080_REG_03_CHANNEL, (Frequency - 760) | 0x8000);
|
||||
}
|
||||
|
||||
void BK1080_GetFrequencyDeviation(uint16_t Frequency)
|
||||
{
|
||||
g_20000362 = Frequency;
|
||||
// Doubts whether this register is signed or not
|
||||
gFM_FrequencyDeviation = (int16_t)BK1080_ReadRegister(BK1080_REG_07) / 16;
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ uint16_t BK1080_ReadRegister(BK1080_Register_t Register);
|
||||
void BK1080_WriteRegister(BK1080_Register_t Register, uint16_t Value);
|
||||
void BK1080_Mute(bool Mute);
|
||||
void BK1080_SetFrequency(uint16_t Frequency);
|
||||
void BK1080_GetFrequencyDeviation(uint16_t Frequency);
|
||||
|
||||
#endif
|
||||
|
||||
|
4
misc.c
4
misc.c
@ -170,8 +170,8 @@ volatile bool gSystickFlag11;
|
||||
|
||||
volatile uint16_t ScanPauseDelayIn10msec;
|
||||
|
||||
// This probably should be signed! But Ghidra disgrees
|
||||
uint16_t gFM_FrequencyDeviation;
|
||||
// Doubts about whether this should be signed or not.
|
||||
int16_t gFM_FrequencyDeviation;
|
||||
|
||||
uint16_t gCurrentRSSI;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user