Commit 7b3077d05a609c57599f14a5b56ba2df508d364d

Authored by luozhesi
1 parent 31c42d6f

minor changes

@@ -694,8 +694,8 @@ void app_nav_rmt_convert_aux(void) @@ -694,8 +694,8 @@ void app_nav_rmt_convert_aux(void)
694 app_dac_receive_pcm_enable(FALSE); 694 app_dac_receive_pcm_enable(FALSE);
695 695
696 #if defined OPL_MODE_TWO_WAY || defined OPL_MODE_SINGLE_WAY 696 #if defined OPL_MODE_TWO_WAY || defined OPL_MODE_SINGLE_WAY
697 - #if 0  
698 - app_change_mode_req(GAME_HEADPHONE_PT_5MS_LP,100,50); 697 + #if 1
  698 + app_change_mode_req(GAME_HEADPHONE_PT_5MS_LP,100,51);
699 #else 699 #else
700 if (optek_link_mode == GAME_HEADPHONE_PT_5MS_LP || optek_link_mode == BC_SF48K_PT5MS) 700 if (optek_link_mode == GAME_HEADPHONE_PT_5MS_LP || optek_link_mode == BC_SF48K_PT5MS)
701 { 701 {
@@ -545,8 +545,9 @@ void optek_link_end_cb(u8 id) @@ -545,8 +545,9 @@ void optek_link_end_cb(u8 id)
545 */ 545 */
546 } 546 }
547 547
548 -#define OPTEK_LINK_HOPPING_CH 37  
549 548
  549 +/*
  550 +#define OPTEK_LINK_HOPPING_CH 37
550 #define OPTEK_LINK_MAX_CH 37 551 #define OPTEK_LINK_MAX_CH 37
551 const u8 optek_link_scan_chan[OPTEK_LINK_MAX_CH] = 552 const u8 optek_link_scan_chan[OPTEK_LINK_MAX_CH] =
552 { 553 {
@@ -556,10 +557,20 @@ const u8 optek_link_scan_chan[OPTEK_LINK_MAX_CH] = @@ -556,10 +557,20 @@ const u8 optek_link_scan_chan[OPTEK_LINK_MAX_CH] =
556 24, 25, 26, 27, 28, 29, 30, 31, 557 24, 25, 26, 27, 28, 29, 30, 31,
557 32, 33, 34, 35, 36 558 32, 33, 34, 35, 36
558 }; 559 };
559 - 560 +*/
560 561
561 // for philips 562 // for philips
  563 +
  564 +#define OPTEK_LINK_HOPPING_CH 8
  565 +#define OPTEK_LINK_MAX_CH 8
  566 +const u8 optek_link_scan_chan[OPTEK_LINK_MAX_CH] =
  567 +{
  568 + 0, 1, 31, 32, 33, 34, 35, 36,
  569 +};
  570 +
  571 +
562 /* 572 /*
  573 +#define OPTEK_LINK_HOPPING_CH 8
563 #define OPTEK_LINK_MAX_CH 8 574 #define OPTEK_LINK_MAX_CH 8
564 const u8 optek_link_scan_chan[OPTEK_LINK_MAX_CH] = 575 const u8 optek_link_scan_chan[OPTEK_LINK_MAX_CH] =
565 { 576 {
@@ -589,6 +600,8 @@ U32 frame_count; @@ -589,6 +600,8 @@ U32 frame_count;
589 static U32 first_dma_count; 600 static U32 first_dma_count;
590 i32 diff_sample; 601 i32 diff_sample;
591 volatile U8 master_rev_flag; 602 volatile U8 master_rev_flag;
  603 +
  604 +//U8 key_value;
592 //void?optek_link_rx_cb(u8?*buf,?u16?len,?u8?bc_index,?u16?pt_end_time,?u8?role,?u8?frame_index,?u8?id)?__attribute__?((section?(".internal_ram_1_text"))); 605 //void?optek_link_rx_cb(u8?*buf,?u16?len,?u8?bc_index,?u16?pt_end_time,?u8?role,?u8?frame_index,?u8?id)?__attribute__?((section?(".internal_ram_1_text")));
593 //void?optek_link_rx_cb(u8?*buf,?u16?len,?u8?bc_index,?u16?pt_end_time,?u8?role,?u8?frame_index,?u8?id) 606 //void?optek_link_rx_cb(u8?*buf,?u16?len,?u8?bc_index,?u16?pt_end_time,?u8?role,?u8?frame_index,?u8?id)
594 void optek_link_rx_cb(u8 *buf, u16 len, u8 bc_index, u16 pt_end_time, u8 role, u8 frame_index, u8 id) __attribute__ ((section (".internal_ram_1_text"))); 607 void optek_link_rx_cb(u8 *buf, u16 len, u8 bc_index, u16 pt_end_time, u8 role, u8 frame_index, u8 id) __attribute__ ((section (".internal_ram_1_text")));
@@ -609,6 +622,8 @@ void optek_link_rx_cb(u8 *buf, u16 len, u8 bc_index, u16 pt_end_time, u8 role, u @@ -609,6 +622,8 @@ void optek_link_rx_cb(u8 *buf, u16 len, u8 bc_index, u16 pt_end_time, u8 role, u
609 //fifo_put_data(&master_rx_fifo,buf,len); 622 //fifo_put_data(&master_rx_fifo,buf,len);
610 623
611 //DBG_Printf("%d-%d-%d,",bc_index,frame_index,pt_end_time); 624 //DBG_Printf("%d-%d-%d,",bc_index,frame_index,pt_end_time);
  625 + //if (len)
  626 + // key_value = buf[len-1];
612 627
613 memcpy(rx_data_buf,buf,len); 628 memcpy(rx_data_buf,buf,len);
614 master_rev_flag = 2; 629 master_rev_flag = 2;
@@ -847,7 +862,7 @@ u8 optek_link_tx_data_len(u8 role, u8 id) @@ -847,7 +862,7 @@ u8 optek_link_tx_data_len(u8 role, u8 id)
847 { 862 {
848 if (optek_link_mode == GAME_HEADPHONE_PT_5MS_LP) 863 if (optek_link_mode == GAME_HEADPHONE_PT_5MS_LP)
849 { 864 {
850 - len = SLAVE_MAX_TX_LEN; 865 + len = bc_tx_data.last_tx_len;
851 } 866 }
852 else 867 else
853 { 868 {
@@ -902,14 +917,22 @@ u8 optek_link_tx_data_cb(u8 cpy, u8 *buf, u8 role, u8 ext_frame, u8 id) @@ -902,14 +917,22 @@ u8 optek_link_tx_data_cb(u8 cpy, u8 *buf, u8 role, u8 ext_frame, u8 id)
902 bc_tx_data.last_tx_len = 0; 917 bc_tx_data.last_tx_len = 0;
903 } 918 }
904 #else 919 #else
905 - len = bc_tx_data.tx_len; 920 + if (role == OPTEK_LINK_MASTER)
  921 + len = bc_tx_data.tx_len;
  922 + else
  923 + {
  924 + len = bc_tx_data.tx_len;
  925 +/* len = bc_tx_data.tx_len + 1;
  926 + bc_tx_data.tx_data[bc_tx_data.tx_len] = 0x55;
  927 +*/
  928 + }
  929 +
906 930
907 if (len) 931 if (len)
908 { 932 {
909 bc_tx_data.tx_len = 0; 933 bc_tx_data.tx_len = 0;
910 934
911 CFasm_memcpy((void *)buf, (void *)bc_tx_data.tx_data,len); 935 CFasm_memcpy((void *)buf, (void *)bc_tx_data.tx_data,len);
912 -  
913 bc_tx_data.last_tx_len = len; 936 bc_tx_data.last_tx_len = len;
914 } 937 }
915 else if (bc_tx_data.last_tx_len) 938 else if (bc_tx_data.last_tx_len)
@@ -1027,7 +1050,7 @@ u8 optek_link_slave_conn_cb (u8 mode, u8 *slave_max_tx_len, u8 *slave_max_rx_len @@ -1027,7 +1050,7 @@ u8 optek_link_slave_conn_cb (u8 mode, u8 *slave_max_tx_len, u8 *slave_max_rx_len
1027 #if (defined OPL_MODE_TWO_WAY) 1050 #if (defined OPL_MODE_TWO_WAY)
1028 else if (mode == GAME_HEADPHONE_PT_5MS_LP) 1051 else if (mode == GAME_HEADPHONE_PT_5MS_LP)
1029 { 1052 {
1030 - *slave_max_tx_len = 50; 1053 + *slave_max_tx_len = 51;
1031 *slave_max_rx_len = 100; 1054 *slave_max_rx_len = 100;
1032 } 1055 }
1033 else if (mode == GAME_HEADPHONE_PT7P5MS_T7R3E) 1056 else if (mode == GAME_HEADPHONE_PT7P5MS_T7R3E)
@@ -286,7 +286,7 @@ uint8_t optek_link_role_change_slave_to_scan (uint8_t act_id); @@ -286,7 +286,7 @@ uint8_t optek_link_role_change_slave_to_scan (uint8_t act_id);
286 286
287 #define TEST_MODE GAME_HEADPHONE_PT_5MS_LP 287 #define TEST_MODE GAME_HEADPHONE_PT_5MS_LP
288 #define MASTER_MAX_TX_LEN 100 288 #define MASTER_MAX_TX_LEN 100
289 -#define SLAVE_MAX_TX_LEN 50 289 +#define SLAVE_MAX_TX_LEN 51
290 290
291 291
292 292
@@ -343,7 +343,7 @@ For 48000 Sample Frequency: @@ -343,7 +343,7 @@ For 48000 Sample Frequency:
343 app_timer_usbdev_upstream_timeout_time_set(1000); 343 app_timer_usbdev_upstream_timeout_time_set(1000);
344 change_to_game_mode_cnt = 0; 344 change_to_game_mode_cnt = 0;
345 if (optek_link_mode == BC_SF48K_PT5MS) 345 if (optek_link_mode == BC_SF48K_PT5MS)
346 - app_change_mode_req(GAME_HEADPHONE_PT_5MS_LP,100,50); 346 + app_change_mode_req(GAME_HEADPHONE_PT_5MS_LP,100,51);
347 else// if (optek_link_mode == BC_SF48K_PT7P5MS) 347 else// if (optek_link_mode == BC_SF48K_PT7P5MS)
348 app_change_mode_req(GAME_HEADPHONE_PT7P5MS_T7R3E,150,75); 348 app_change_mode_req(GAME_HEADPHONE_PT7P5MS_T7R3E,150,75);
349 } 349 }
@@ -363,7 +363,7 @@ const WINDOW AUX_window = { @@ -363,7 +363,7 @@ const WINDOW AUX_window = {
363 WINDOW_RESERVES, 363 WINDOW_RESERVES,
364 app_window_draw_region_none, //draw region 364 app_window_draw_region_none, //draw region
365 KEY_TABLE(APP_NAV_AUX_KEY), 365 KEY_TABLE(APP_NAV_AUX_KEY),
366 - 100000, //window time 366 + 4000, //window time
367 app_AUX_window_timer, //window timer handler 367 app_AUX_window_timer, //window timer handler
368 }; 368 };
369 369
@@ -994,6 +994,7 @@ const APP_NAV_KEY APP_NAV_PC_SPEAKER_KEY [] = { @@ -994,6 +994,7 @@ const APP_NAV_KEY APP_NAV_PC_SPEAKER_KEY [] = {
994 994
995 {APP_KEY_SOURCE, NULL,app_nav_source_released,0,NULL}, //Source 995 {APP_KEY_SOURCE, NULL,app_nav_source_released,0,NULL}, //Source
996 }; 996 };
  997 +
997 void app_pc_window_timer(void) 998 void app_pc_window_timer(void)
998 { 999 {
999 app_timer_window_time_set (app_main_data.window->window_time); 1000 app_timer_window_time_set (app_main_data.window->window_time);
Please register or login to post a comment