From: p15692025051 <846603105@qq.com> Date: Thu, 27 Feb 2025 02:09:17 +0000 (+0800) Subject: IO修改 X-Git-Url: http://git.snicker.com.cn/css/html/static/gitweb.css?a=commitdiff_plain;h=6359cf9cdb77773896ba56da7d012a718957b616;p=mirrors%2FVmouse-tlw-huoshan.git IO修改 --- diff --git a/3.code_8251_8373/b85_ble_sdk/vendor/8258_dual_mouse/AAA_Public.c b/3.code_8251_8373/b85_ble_sdk/vendor/8258_dual_mouse/AAA_Public.c index e518d84..ea4ab5f 100644 --- a/3.code_8251_8373/b85_ble_sdk/vendor/8258_dual_mouse/AAA_Public.c +++ b/3.code_8251_8373/b85_ble_sdk/vendor/8258_dual_mouse/AAA_Public.c @@ -831,12 +831,12 @@ u16 btn_scan() button_status = button_get_status(PIN_BTN_LEFT); if (button_status == 1) { - now_value |= MS_BTN_LEFT; + now_value |= MS_BTN_MIDDLE;//MS_BTN_LEFT; } else if (button_status == 2) { #if(BK_AUT) - now_value |= MS_BTN_voice; + now_value |= MS_BTN_LEFT;//MS_BTN_voice; #else now_value |= MS_BTN_K4; #endif @@ -849,38 +849,47 @@ u16 btn_scan() } else if (button_status == 2) { - #if(BK_AUT) - now_value |= MS_BTN_m; - #else - now_value |= MS_BTN_K5; - #endif + // #if(BK_AUT) + // now_value |= MS_BTN_m; + // #else + // now_value |= MS_BTN_K5; + // #endif //now_value |= MS_BTN_VOICE; } - button_status = button_get_status(PIN_BTN_MIDDLE); + button_status = button_get_status(PIN_BTN_M); if (button_status == 1) { - now_value |= MS_BTN_MIDDLE; + now_value |= MS_BTN_m; } else if (button_status == 2) { - #if(BK_AUT) - now_value |= MS_BTN_ai; - #else + // #if(BK_AUT) + // now_value |= MS_BTN_ai; + // #else now_value |= MS_BTN_VOICE; - #endif + //#endif //now_value |= MS_BTN_K5; } - - if(!gpio_read(PIN_MODE_SWITCH )) + button_status = button_get_status(PIN_MODE_SWITCH); + if (button_status == 1) + { + now_value |= MS_BTN_ai; + } + else if (button_status == 2) { - #if(BK_AUT) - now_value |= MS_BTN_MODE_SWITCH ; - #else - now_value |= MS_BTN_MODE; - #endif - printf("btn mode press\n"); + now_value |= MS_BTN_MODE_SWITCH; + } + // if(!gpio_read(PIN_MODE_SWITCH )) + // { + // #if(BK_AUT) + // now_value |= MS_BTN_MODE_SWITCH ; + // #else + // now_value |= MS_BTN_MODE; + // #endif + // printf("btn mode press\n"); + // } return now_value; } @@ -1733,12 +1742,12 @@ void bk_button_handle( u8 event_new) #if BK_AUT && BK_AUT_KEY_CMD //BK_aut_hal_send("���������\n",sizeof("���������\n")); - BK_button_callback(voice_button,PRESS_DOWN);//��������� + BK_button_callback(voice_button,PRESS_DOWN);//��������ï¿? bk_printf("voice button \n"); #endif //w_snd_val(0x01); } - else if(clock_time_exceed(btn_tick, 290000))//������������� + else if(clock_time_exceed(btn_tick, 290000))//������������ï¿? { if(voice_key_flg == 1) //����һֱ�ظ��������� { @@ -1746,7 +1755,7 @@ void bk_button_handle( u8 event_new) #if BK_AUT && BK_AUT_KEY_CMD //BK_aut_hal_send("���������\n",sizeof("���������\n")); printf("voice button long press start\n"); - BK_button_callback(voice_button,LONG_PRESS_START);//�����������ʼ + BK_button_callback(voice_button,LONG_PRESS_START);//�����������Ê? #else if(connect_ok) { @@ -1762,7 +1771,7 @@ void bk_button_handle( u8 event_new) } } - else if((last_btn_value & MS_BTN_voice) == MS_BTN_voice) //������ͷ� voice key new release + else if((last_btn_value & MS_BTN_voice) == MS_BTN_voice) //������ͷï¿? voice key new release { if(event_new != 0) { @@ -1771,7 +1780,7 @@ void bk_button_handle( u8 event_new) #if BK_AUT && BK_AUT_KEY_CMD //BK_aut_hal_send("����������ͷ�\n",sizeof("����������ͷ�\n")); printf("voice button long release\n"); - BK_button_callback(voice_button,PRESS_UP);//����������� + BK_button_callback(voice_button,PRESS_UP);//����������ï¿? #else w_snd_val(0x10); ui_enable_mic(0); //voice off @@ -1782,7 +1791,7 @@ void bk_button_handle( u8 event_new) #if BK_AUT && BK_AUT_KEY_CMD //BK_aut_hal_send("������̰��ͷ�\n",sizeof("������̰��ͷ�\n")); printf("voice button short release\n"); - BK_button_callback(voice_button,SINGLE_CLICK);//������̰� + BK_button_callback(voice_button,SINGLE_CLICK);//������̰ï¿? #else if(!ui_mic_enable) { @@ -1862,7 +1871,7 @@ void bk_button_handle( u8 event_new) #if BK_AUT && BK_AUT_KEY_CMD printf("AI button short release\n"); //BK_aut_hal_send("AI�̰��ͷ�\n",sizeof("AI�̰��ͷ�\n")); - BK_button_callback(AI_button,SINGLE_CLICK);//������̰� + BK_button_callback(AI_button,SINGLE_CLICK);//������̰ï¿? #else w_snd_val(0x06); #endif @@ -2466,7 +2475,7 @@ void vendor_protocol_handler (const u8* pData, u8 Len) //luyong direct pc if(!ui_mic_enable) { audio_stick = clock_time()|1; - ui_enable_mic(1);//¼��� + ui_enable_mic(1);//¼��ï¿? } } else if(pData[0] == AP_CMD_CONNECT_REQ) //connect start @@ -2513,7 +2522,7 @@ void vendor_protocol_handler (const u8* pData, u8 Len) //luyong direct pc pData_cmd[4] = 1; //version H pData_cmd[5] = flash_dpi_info.bt_dpi;; //dpi L pData_cmd[6] = 0x00; //dpi H - pData_cmd[7] = 0; //���״̬ �� 0 �� �� 1. ���״̬ + pData_cmd[7] = 0; //���״Ì? �� 0 �ï¿? �� 1. ���״Ì? pData_cmd[8] = my_batVal[0]; //���� //bls_att_pushNotifyData(USER_REPORT_INPUT_CD2_H, pData_cmd, 16); if(user_data.mouse_mode != RF_2M_2P4G_MODE) @@ -2779,7 +2788,7 @@ void user_protocol_handler (const u8* pData, u8 Len) //luyong for dongle pData_cmd[3] = 1; pData_cmd[4] = flash_dpi_info.bt_dpi; //1 -4 pData_cmd[5] = 0x00; - pData_cmd[6] = 0; //���״̬ �� 0 �� �� 1. ���״̬ + pData_cmd[6] = 0; //���״Ì? �� 0 �ï¿? �� 1. ���״Ì? pData_cmd[7] = my_batVal[0]; //���� //bls_att_pushNotifyData(HID_USER_REPORT_INPUT_DP_H, pData_cmd, 8); if(user_data.mouse_mode != RF_2M_2P4G_MODE) @@ -2995,7 +3004,7 @@ void bk_init() stb_app_deinit(); /* ��������stb_app_device_init - ������������ʼ��Ӧ�õĵײ� SDK��ִ�б�Ҫ�ij�ʼ���������������Դ�����ó�ʼ״̬�ȡ� + ������������ʼ��Ӧ�õĵײ� SDK��ִ�б�Ҫ�ij�ʼ���������������Դ�����ó�ʼ״Ì?�ȡ� ����: uint8_t *pk_str - ָ��PK�ַ������ӻ�ɽ�Ŷӻ�ȡ uint8_t *ps_str - ָ��PS�ַ������ӻ�ɽ�Ŷӻ�ȡ uint8_t *mac_str - ָ���豸����MAC�ַ��� diff --git a/3.code_8251_8373/b85_ble_sdk/vendor/8258_dual_mouse/AAA_app_config_Telink_QFN32.h b/3.code_8251_8373/b85_ble_sdk/vendor/8258_dual_mouse/AAA_app_config_Telink_QFN32.h index 5b3abba..d79ec5e 100644 --- a/3.code_8251_8373/b85_ble_sdk/vendor/8258_dual_mouse/AAA_app_config_Telink_QFN32.h +++ b/3.code_8251_8373/b85_ble_sdk/vendor/8258_dual_mouse/AAA_app_config_Telink_QFN32.h @@ -186,25 +186,25 @@ #define BTN_PM_WAKEUP_SRC PM_PIN_PULLUP_1M - #define PIN_BTN_LEFT GPIO_PD2 + #define PIN_BTN_LEFT GPIO_PB5 #define PD2_INPUT_ENABLE 1 #define PD2_OUTPUT_ENABLE 0 #define PD2_DATA_OUT 1 #define PULL_WAKEUP_SRC_PD2 BTN_PM_WAKEUP_SRC - #define PIN_BTN_RIGHT GPIO_PD3 + #define PIN_BTN_RIGHT GPIO_PB6 #define PD3_INPUT_ENABLE 1 #define PD3_OUTPUT_ENABLE 0 #define PD3_DATA_OUT 1 #define PULL_WAKEUP_SRC_PD3 BTN_PM_WAKEUP_SRC - #define PIN_BTN_MIDDLE GPIO_PB5 + #define PIN_BTN_M GPIO_PD3 #define PB5_INPUT_ENABLE 1 #define PB5_OUTPUT_ENABLE 0 #define PB5_DATA_OUT 1 #define PULL_WAKEUP_SRC_PB5 BTN_PM_WAKEUP_SRC - #define PIN_MODE_SWITCH GPIO_PB6 + #define PIN_MODE_SWITCH GPIO_PD2 #define PB6_INPUT_ENABLE 1 #define PB6_OUTPUT_ENABLE 0 #define PB6_DATA_OUT 1 @@ -213,7 +213,7 @@ #define PB6_FUNC AS_GPIO #define IS_BLE_MODE_AAA (gpio_read(PIN_MODE_SWITCH)!=0) - #define BTN_MATRIX {PIN_BTN_LEFT,PIN_BTN_RIGHT,PIN_BTN_MIDDLE,PIN_MODE_SWITCH} + #define BTN_MATRIX {PIN_BTN_LEFT,PIN_BTN_RIGHT,PIN_BTN_M,PIN_MODE_SWITCH} #endif @@ -246,20 +246,21 @@ #define PULL_WAKEUP_SRC_PC3 PM_PIN_UP_DOWN_FLOAT - #define PIN_BLE_LED GPIO_PA7 - #define PA7_INPUT_ENABLE 0 - #define PA7_OUTPUT_ENABLE 1 - #define PA7_DATA_OUT LED_OFF_AAA - #define PULL_WAKEUP_SRC_PA7 PM_PIN_UP_DOWN_FLOAT - #define PA7_FUNC AS_GPIO - - #define PIN_BLE2_LED GPIO_PC2 + #define PIN_BLE_LED GPIO_PC2 #define PC2_INPUT_ENABLE 0 #define PC2_OUTPUT_ENABLE 1 #define PC2_DATA_OUT LED_OFF_AAA #define PULL_WAKEUP_SRC_PC2 PM_PIN_UP_DOWN_FLOAT #define PC2_FUNC AS_GPIO + #define PIN_BLE2_LED GPIO_PA7 + #define PA7_INPUT_ENABLE 0 + #define PA7_OUTPUT_ENABLE 1 + #define PA7_DATA_OUT LED_OFF_AAA + #define PULL_WAKEUP_SRC_PA7 PM_PIN_UP_DOWN_FLOAT + #define PA7_FUNC AS_GPIO + + #endif