diff --git a/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/core/xu316_qf60.xn b/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/core/xu316_qf60.xn index 21eb2f4..832b143 100644 --- a/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/core/xu316_qf60.xn +++ b/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/core/xu316_qf60.xn @@ -33,6 +33,11 @@ + + + + + @@ -42,6 +47,8 @@ + + diff --git a/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/extensions/audiohw.xc b/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/extensions/audiohw.xc index 5be05df..f828e54 100644 --- a/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/extensions/audiohw.xc +++ b/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/extensions/audiohw.xc @@ -99,12 +99,12 @@ unsigned g_request_factory_reset = 0; on tile[0]: port p_scl = PORT_I2C_SCL; on tile[0]: port p_sda = PORT_I2C_SDA; -// TX1 Button ports (from Portmap_TX1.xls) -on tile[0]: in port p_button_fps_game_mic = XS1_PORT_4F; // bit3=FPS, bit2=GAME, bit1=MIC_MUTE -on tile[0]: in port p_button_vol = XS1_PORT_4E; // bit3=VOL+, bit2=VOL- +// TX1 Button ports — 改动原因:使用 xu316_qf60.xn 中与 jok.xn 一致的符号名,避免硬编码端口 +on tile[0]: in port p_button_fps_game_mic = PORT_BUTTON_FPSMODE_GAMEMODE_MICMUTE; // 4F bit3=FPS, bit2=GAME, bit1=MIC +on tile[0]: in port p_button_vol = PORT_BUTTON_VOLPLUS_VOLMINUS; // 4E bit3=VOL+, bit2=VOL- // TX1 GPIO LEDs on tile[0] -on tile[0]: out port p_led_tile0 = XS1_PORT_8D; // bit7=D10_GREEN, bit6=D8_GREEN, bit5=D11_BLUE, bit4=D9_BLUE +on tile[0]: out port p_led_tile0 = PORT_LED_D10_8_11_9; // 8D bit7-4 = D10/D8/D11/D9,低有效 // TX1 GPIO LEDs on tile[1] - declared in tx1_led_helper.xc diff --git a/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/extensions/tx1_led_helper.xc b/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/extensions/tx1_led_helper.xc index 3af39f6..a4331b8 100644 --- a/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/extensions/tx1_led_helper.xc +++ b/sw_usb_audio/app_usb_aud_fosi_c1_v71/src/extensions/tx1_led_helper.xc @@ -2,17 +2,18 @@ #include #include "user_main.h" -// TX1 GPIO LEDs on tile[1] - port declarations (moved from audiohw.xc) -on tile[1]: out port p_led_d5 = XS1_PORT_1A; // FPS20 indicator -on tile[1]: out port p_led_d1 = XS1_PORT_1B; // FOOTSTEPS indicator -on tile[1]: out port p_led_d2 = XS1_PORT_1C; // MIC MUTE indicator -on tile[1]: out port p_led_d3 = XS1_PORT_4A; // GUNSHOT indicator (uses 4A bit3) -on tile[1]: out port p_led_d4_d7_d6 = XS1_PORT_4D; // bit3=D4_GAME, bit2=D7_3A, bit0=D6_FPS71 +// TX1 GPIO LEDs on tile[1] — 改动原因:与 jok.xn / xu316_qf60.xn 符号名一致 +on tile[1]: out port p_led_d5 = PORT_LED_D5; // FPS20 indicator +on tile[1]: out port p_led_d1 = PORT_LED_D1; // FOOTSTEPS indicator +on tile[1]: out port p_led_d2 = PORT_LED_D2; // MIC MUTE indicator +on tile[1]: out port p_led_d3 = PORT_LED_D3; // GUNSHOT (4A bit3) +on tile[1]: out port p_led_d4_d7_d6 = PORT_LED_D4_7_6; // 4D: bit3=D4, bit2=D7, bit0=D6 // TX1 HTR3236 RGB LED driver control // 改动原因:与 xu316_qf60.xn 中 PORT_HTR3236_SDB 一致,避免硬编码端口与 xn 脱节 on tile[1]: out port p_htr3236_sdb = PORT_HTR3236_SDB; -on tile[1]: out port p_ctl_mute = XS1_PORT_1F; // Amplifier mute control +// 改动原因:与 jok.xn / xu316_qf60.xn 中 PORT_CTL_MUTE 一致 +on tile[1]: out port p_ctl_mute = PORT_CTL_MUTE; // tile[1] LED helper task - controls tile[1] GPIO LED ports // Receives commands via tx1_led_if interface from AudioHwRemote2 on tile[0]