mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 14:48:03 +03:00
MDC100 update
This commit is contained in:
@ -268,7 +268,7 @@ void BK4819_DisableAGC(void)
|
||||
// 000=Bypass DC filter;
|
||||
//
|
||||
BK4819_WriteRegister(0x7E,
|
||||
(1u << 15) | // 0 AGC fix mode
|
||||
(0u << 15) | // 0 AGC fix mode
|
||||
(3u << 12) | // 3 AGC fix index
|
||||
(5u << 3) | // 5 DC Filter band width for Tx (MIC In)
|
||||
(6u << 0)); // 6 DC Filter band width for Rx (I.F In)
|
||||
@ -345,7 +345,7 @@ void BK4819_EnableAGC(void)
|
||||
//BK4819_WriteRegister(0x7E, (1u << 15) | (4u << 12) | (5u << 3) | (6u << 0));
|
||||
|
||||
BK4819_WriteRegister(0x7E,
|
||||
(0u << 15) | // 0 AGC fix mode
|
||||
(1u << 15) | // 0 AGC fix mode
|
||||
(3u << 12) | // 3 AGC fix index
|
||||
(5u << 3) | // 5 DC Filter band width for Tx (MIC In)
|
||||
(6u << 0)); // 6 DC Filter band width for Rx (I.F In)
|
||||
@ -1174,7 +1174,8 @@ void BK4819_TxOn_Beep(void)
|
||||
{
|
||||
BK4819_WriteRegister(0x37, 0x1D0F);
|
||||
BK4819_WriteRegister(0x52, 0x028F);
|
||||
BK4819_WriteRegister(0x30, 0x0000);
|
||||
|
||||
BK4819_WriteRegister(0x30, 0);
|
||||
BK4819_WriteRegister(0x30, 0xC1FE);
|
||||
}
|
||||
|
||||
@ -1217,7 +1218,7 @@ void BK4819_ExitSubAu(void)
|
||||
// 0 = min
|
||||
// 127 = max
|
||||
//
|
||||
BK4819_WriteRegister(0x51, 0x0000);
|
||||
BK4819_WriteRegister(0x51, 0);
|
||||
}
|
||||
|
||||
void BK4819_Conditional_RX_TurnOn_and_GPIO6_Enable(void)
|
||||
@ -1969,15 +1970,22 @@ void BK4819_start_fsk_rx(const unsigned int packet_size)
|
||||
|
||||
#ifdef ENABLE_MDC1200
|
||||
|
||||
void BK4819_PlayRogerMDC1200(void)
|
||||
void BK4819_send_MDC1200(const uint8_t op, const uint8_t arg, const uint16_t id)
|
||||
{
|
||||
uint16_t fsk_reg59;
|
||||
uint8_t packet[42];
|
||||
|
||||
const uint8_t op = MDC1200_OP_CODE_POST_ID;
|
||||
const uint8_t arg = 0x80;
|
||||
const uint16_t id = 0xB183;
|
||||
|
||||
// REG_51
|
||||
//
|
||||
// <15> 1 = Enable TxCTCSS/CDCSS
|
||||
// 0 = Disable
|
||||
//
|
||||
if (BK4819_ReadRegister(0x51) & (1u << 15))
|
||||
{ // need to turn oss the CRCSS/CDCSS
|
||||
BK4819_ExitSubAu();
|
||||
SYSTEM_DelayMs(10);
|
||||
}
|
||||
|
||||
// create the MDC1200 packet
|
||||
const unsigned int size = MDC1200_encode_single_packet(packet, op, arg, id);
|
||||
|
||||
@ -2116,7 +2124,7 @@ void BK4819_PlayRogerMDC1200(void)
|
||||
(0u << 9) | // 0 ~ 1 1 = invert data when TX
|
||||
(0u << 8) | // 0 ~ 1 ???
|
||||
(0u << 4) | // 0 ~ 15 preamble length
|
||||
(0u << 3) | // 0 ~ 1 sync length
|
||||
(1u << 3) | // 0 ~ 1 sync length
|
||||
(0u << 0); // 0 ~ 7 ???
|
||||
|
||||
// Set entire packet length (not including the pre-amble and sync bytes we can't seem to disable)
|
||||
@ -2137,7 +2145,7 @@ void BK4819_PlayRogerMDC1200(void)
|
||||
// <15:8> 0x55 FSK Sync Byte 2 (Sync Byte 0 first, then 1,2,3)
|
||||
// <7:0> 0xAA FSK Sync Byte 3
|
||||
//
|
||||
BK4819_WriteRegister(0x5B, 0x0000); // bytes 2 & 3 (not used)
|
||||
BK4819_WriteRegister(0x5B, 0x0000); // bytes 2 & 3
|
||||
|
||||
// CRC setting (plus other stuff we don't know what)
|
||||
//
|
||||
|
@ -156,8 +156,9 @@ uint8_t BK4819_GetCTCType(void);
|
||||
void BK4819_start_fsk_rx(const unsigned int packet_size);
|
||||
|
||||
void BK4819_PlayRoger(void);
|
||||
|
||||
#ifdef ENABLE_MDC1200
|
||||
void BK4819_PlayRogerMDC1200(void);
|
||||
void BK4819_send_MDC1200(const uint8_t op, const uint8_t arg, const uint16_t id);
|
||||
#endif
|
||||
|
||||
void BK4819_Enable_AfDac_DiscMode_TxDsp(void);
|
||||
|
Reference in New Issue
Block a user