void RDABT_rf_Intialization_r10_al(void) { unsigned char i=0; for(i =0;i<sizeof(rdabt_rf_init_10_al)/sizeof(rdabt_rf_init_10_al[0]); i++) { rdabt_iic_rf_write_data(rdabt_rf_init_10_al[i][0],&rdabt_rf_init_10_al[i][1],1); } RDABT_DELAY(10); }
void Rdabt_Pskey_Write_r10(void) { kal_int32 i; for(i=0;i<sizeof(rda_pskey_10)/sizeof(rda_pskey_10[0]);i++) { rdabt_wirte_memory(rda_pskey_10[i][0],&rda_pskey_10[i][1],1,0); RDABT_DELAY(2); } }
void Rdabt_trap_write_r10(void) { kal_int32 i; for(i=0;i<sizeof(rda_trap_10)/sizeof(rda_trap_10[0]);i++) { rdabt_wirte_memory(rda_trap_10[i][0],&rda_trap_10[i][1],1,0); RDABT_DELAY(1); } }
void Rdabt_vco_test_Write_r578() { kal_uint8 i; for(i=0; i<sizeof(rdabt_vco_test_578)/sizeof(rdabt_vco_test_578[0]); i++) { rdabt_wirte_memory(rdabt_vco_test_578[i][0],&rdabt_vco_test_578[i][1],1,0); RDABT_DELAY(1); } }
void Rdabt_dut_trap_write_r11(void) { kal_uint8 i; for(i=0; i<sizeof(rdabt_dut_trap_11)/sizeof(rdabt_dut_trap_11[0]); i++) { rdabt_wirte_memory(rdabt_dut_trap_11[i][0],&rdabt_dut_trap_11[i][1],1,0); RDABT_DELAY(1); } }
void Rdabt_dut_pskey_write_r578(void) { kal_uint8 i; for(i=0; i<sizeof(rdabt_test_pskey_578)/sizeof(rdabt_test_pskey_578[0]); i++) { rdabt_wirte_memory(rdabt_test_pskey_578[i][0],&rdabt_test_pskey_578[i][1],1,0); RDABT_DELAY(1); } }
void rdabt_vco_test_write_r10(void) { kal_uint8 i; for(i=0; i<sizeof(rdabt_vco_test_10)/sizeof(rdabt_vco_test_10[0]); i++) { rdabt_wirte_memory(rdabt_vco_test_10[i][0],&rdabt_vco_test_10[i][1],1,0); RDABT_DELAY(1); } }
void Rdabt_lpo_Setting__write_r10_al(void) { kal_int32 i; for(i=0;i<sizeof(rda_lpo_setting_10_al)/sizeof(rda_lpo_setting_10_al[0]);i++) { rdabt_wirte_memory(rda_lpo_setting_10_al[i][0],&rda_lpo_setting_10_al[i][1],1,0); RDABT_DELAY(1); } }
void Rdabt_patch_write_r10(void) { #if defined(_RDA_PATCH_UART2_) || defined(_RDA_PATCH_UART3_) kal_int32 i; for(i=0;i<sizeof(rda_patch_10)/sizeof(rda_patch_10[0]);i++) { rdabt_wirte_memory(rda_patch_10[i][0],&rda_patch_10[i][1],61,0); RDABT_DELAY(10); } #endif }
void Rdabt_trap_write_r18(void) { // extern BOOL g_CalbClock; int32 i; #if 0 if(g_CalbClock) { hal_HstSendEvent(1, 0x88888888); for(i=0;i<sizeof(rda_trap_calib_18)/sizeof(rda_trap_calib_18[0]);i++) { rdabt_wirte_memory(rda_trap_calib_18[i][0],&rda_trap_calib_18[i][1],1,0x0); RDABT_DELAY(1); } } else #endif { for(i=0;i<sizeof(rda_trap_18)/sizeof(rda_trap_18[0]);i++) { rdabt_wirte_memory(rda_trap_18[i][0],&rda_trap_18[i][1],1,0); RDABT_DELAY(1); } #if 0 rdabt_adp_uart_stop(); rdabt_adp_uart_start(); rdabt_adp_uart_configure(115200,FALSE); rdabt_uart_register_cb(); rdabt_baudrate_ctrl(); RDABT_DELAY(100); for(i=0;i<sizeof(rda_trap_18_2)/sizeof(rda_trap_18_2[0]);i++) { rdabt_wirte_memory(rda_trap_18_2[i][0],&rda_trap_18_2[i][1],1,0); RDABT_DELAY(1); } #endif } }
void Rdabt_lpo_patch_write_r10_al(void) { rdabt_wirte_memory(rdabt_lpo_patch_10_al,sizeof(rdabt_lpo_patch_10_al),61,0); RDABT_DELAY(10); }
void Rdabt_setfilter_r10(void) { kal_uint16 num_send; rdabt_uart_tx(rda_filter_10,sizeof(rda_filter_10),&num_send); RDABT_DELAY(1); }
void Rdabt_unsniff_prerxon_write_r10(void) { kal_uint16 num_send; rdabt_uart_tx(rdabt_unsniff_prerxon_10,sizeof(rdabt_unsniff_prerxon_10),&num_send); RDABT_DELAY(1); }
kal_uint8 rda_bt_poweron_for_test(void) { // Enable 26M AUX clock hal_SysAuxClkOut(TRUE); #ifdef __RDA_SHARE_CRYSTAL__ if(bt_sleephdl == 0xff) bt_sleephdl = L1SM_GetHandle(); L1SM_SleepDisable(bt_sleephdl); #endif rdabt_chip_sel = 0; rda_bt_power_on(); rda_bt_rf_init(); rda_bt_uart_init(); RDA_bt_Power_On_Reset(); RDABT_DELAY(70); switch(rdabt_chip_sel) { #ifdef __RDA_CHIP_R5_5868__ case RDA_BT_R5_5868_ENUM: Rdabt_Pskey_Write_rf_r5(); RDABT_DELAY(10); Rdabt_dut_pskey_write_r578(); break; #endif #ifdef __RDA_CHIP_R7_5868plus__ case RDA_BT_R7_5868PLUS_ENUM: Rdabt_Pskey_Write_rf_r7(); RDABT_DELAY(10); Rdabt_dut_pskey_write_r578(); break; #endif #ifdef __RDA_CHIP_R8_5870__ case RDA_BT_R8_5870_ENUM: Rdabt_Pskey_Write_rf_r8(); RDABT_DELAY(10); Rdabt_dut_pskey_write_r578(); break; #endif #if defined( __RDA_CHIP_R10_5868E__ ) || defined(__RDA_CHIP_R10_5872__) case RDA_BT_R10_5872_ENUM: case RDA_BT_R10_5868E_ENUM: Rdabt_core_uart_Intialization_r10(); RDABT_DELAY(10); //wait for first uart data Rdabt_Pskey_Write_rf_r10(); Rdabt_test_pskey_write_r10(); break; #endif #if defined(__RDA_CHIP_R10_5868H__) || defined(__RDA_CHIP_R10_5872H__) case RDA_BT_R10_AL_5868H_ENUM: case RDA_BT_R10_AL_5872H_ENUM: RDABT_rf_Intialization_r10_al(); Rdabt_Pskey_Write_rf_r10_al(); RDABT_DELAY(5); //wait for digi running rdabt_DC_write_r10_al(); Rdabt_test_pskey_write_r10(); break; #endif #ifdef __RDA_CHIP_R10_5870E__ case RDA_BT_R10_5870E_ENUM: RDABT_rf_Intialization_r10_e(); Rdabt_Pskey_Write_rf_r10_e(); RDABT_DELAY(5); //wait for digi running rdabt_DC_write_r10_e(); Rdabt_test_pskey_write_r10(); break; #endif #ifdef __RDA_CHIP_R11_5872P__ case RDA_BT_R11_5872P_ENUM: Rdabt_Pskey_Write_rf_r11_p(); RDABT_rf_Intialization_r11_p(); rda_bt_pin_to_low(); rda_bt_ldoon_toggle_high(); RDABT_DELAY(10); //wait for digi running Rdabt_Pskey_Write_rf_r11_p(); RDABT_rf_Intialization_r11_p(); rdabt_DC_write_r11_p(); Rdabt_test_pskey_write_r11(); break; #endif #ifdef __RDA_CHIP_R11_5875__ case RDA_BT_R11_5875_ENUM: rda_bt_ldoon_toggle_high(); RDABT_DELAY(10); //wait for digi running RDABT_rf_Intialization_r11(); Rdabt_Pskey_Write_rf_r11(); rdabt_DC_write_r11(); Rdabt_test_pskey_write_r11(); break; #endif default: // ASSERT(0); // xiaoyifeng break; } // Disable 26M AUX clock hal_SysAuxClkOut(FALSE); return 1; }