Skip to content

Commit

Permalink
update firmware to V2.1.4
Browse files Browse the repository at this point in the history
1. Fix BUG: There are some errors when using Capslock+Space alone to simulate left and right mouse buttons.
  • Loading branch information
ChnMasterOG committed Aug 9, 2024
1 parent ed0feca commit 1881c02
Show file tree
Hide file tree
Showing 13 changed files with 214,822 additions and 214,898 deletions.
6 changes: 5 additions & 1 deletion README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TP78 is a three mode mechanical keyboard project based on CH528M. It is designed

![TP78](resources/TP78V2.jpg)V2.0 :Video shown in bilibili:[【软软核】为自己做一把小红点三模键盘\_哔哩哔哩\_bilibili](https://www.bilibili.com/video/BV1Ho4y1b78t/)

![TP78 3D print By A1mini](resources/TP78V2.13D_By_A1mini.jpg)
![TP78 3D print By A1mini](resources/TP78_attribute.png)

V2.1:Video shown in bilibili: [TP78指点杆三模键盘-Gasket版出炉啦 (速来拼车)_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV1fA4m1V7DX/)

Expand Down Expand Up @@ -242,3 +242,7 @@ You can submit you code [here](https://github.com/ChnMasterOG/tp78_v2/issues). T
        3. Modify the HID descriptor configuration of USB/BLE/RF and add knob configuration. **After updating the version, it is necessary to upgrade the receiver firmware.**

        4. Update the document to include instructions for VIA, U-disk, and OLED icon descriptions.

- V2.1.4

        1. Fix BUG: There are some errors when using Capslock+Space alone to simulate left and right mouse buttons([Issue #3](https://github.com/ChnMasterOG/tp78_v2/issues/3)).
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TP78是基于CH582M的三模机械键盘方案。以满足带有小红点 便携

![TP78](resources/TP78V2.jpg)V2.0 :视频展示:[【软软核】为自己做一把小红点三模键盘\_哔哩哔哩\_bilibili](https://www.bilibili.com/video/BV1Ho4y1b78t/)

![TP78 3D print By A1mini](resources/TP78V2.13D_By_A1mini.jpg)
![TP78 3D print By A1mini](resources/TP78_attribute.png)

V2.1:视频展示: [TP78指点杆三模键盘-Gasket版出炉啦 (速来拼车)_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV1fA4m1V7DX/)

Expand Down Expand Up @@ -248,3 +248,7 @@ BUG
器固件

        4. 更新文档,增加VIA改键说明、U盘改键说明和OLED图标描述

- V2.1.4

        1. 修复BUG:单独使用Capslock+空格模拟鼠标左右键异常([Issue #3](https://github.com/ChnMasterOG/tp78_v2/issues/3)
Binary file modified documents/TP78v2指导文档.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions mounriver_project/KEYBOARD_CH582M/HAL/HW_I2C.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ uint8_t HW_I2C_WaitUntilTimeout(expression_func exp_func, uint32_t event_flag, u
timeout--;
}
}
if (exp_func == (expression_func)I2C_GetFlagStatus && event_flag == I2C_FLAG_BUSY && timeout == 0) {
/* 总线异常 */
HW_I2C_Reset();
}
// if (exp_func == (expression_func)I2C_GetFlagStatus && event_flag == I2C_FLAG_BUSY && timeout == 0) {
// /* 总线异常 */
// HW_I2C_Reset();
// }
return timeout == 0;
}

Expand Down
43 changes: 22 additions & 21 deletions mounriver_project/KEYBOARD_CH582M/HAL/MCU.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,23 +143,24 @@ __attribute__((weak)) void HID_KEYBOARD_Process(void)
}
#endif
if ( KEYBOARD_Custom_Function() ) { // 普通按键,带有Fn键处理信息则不产生键盘事件
if ( g_Ready_Status.usb == TRUE ) {
OnBoard_SendMsg(usbTaskID, KEY_MESSAGE, 1, NULL); // USB键盘事件
} else if ( g_Ready_Status.ble == TRUE ) {
OnBoard_SendMsg(hidEmuTaskId, KEY_MESSAGE, 1, NULL); // 蓝牙键盘事件
} else if ( g_Enable_Status.rf == TRUE ) {
OnBoard_SendMsg(RFTaskId, KEY_MESSAGE, 1, NULL); // RF键盘事件
}
}
if ( g_Ready_Status.keyboard_mouse_data == TRUE ) { // 发送键盘鼠标数据
g_Ready_Status.keyboard_mouse_data = FALSE;
tmos_memset(&HIDMouse[1], 0, 3); // 只按左中右键没有其他操作
if ( g_Ready_Status.usb == TRUE ) {
OnBoard_SendMsg(usbTaskID, MOUSE_MESSAGE, 1, NULL); // USB鼠标事件
} else if ( g_Ready_Status.ble == TRUE ) {
OnBoard_SendMsg(hidEmuTaskId, MOUSE_MESSAGE, 1, NULL); //蓝牙鼠标事件
} else if ( g_Enable_Status.rf == TRUE ) {
OnBoard_SendMsg(RFTaskId, MOUSE_MESSAGE, 1, NULL); // RF鼠标事件
if ( g_Ready_Status.keyboard_mouse_data == TRUE ) { // 发送键盘鼠标数据
g_Ready_Status.keyboard_mouse_data = FALSE;
tmos_memset(&HIDMouse[1], 0, 3); // 只按左中右键没有其他操作
if ( g_Enable_Status.usb == TRUE ) {
OnBoard_SendMsg(usbTaskID, MOUSE_MESSAGE, 1, NULL); // USB鼠标事件
} else if ( g_Ready_Status.ble == TRUE ) {
OnBoard_SendMsg(hidEmuTaskId, MOUSE_MESSAGE, 1, NULL); //蓝牙鼠标事件
} else if ( g_Enable_Status.rf == TRUE ) {
OnBoard_SendMsg(RFTaskId, MOUSE_MESSAGE, 1, NULL); // RF鼠标事件
}
} else {
if ( g_Enable_Status.usb == TRUE ) {
OnBoard_SendMsg(usbTaskID, KEY_MESSAGE, 1, NULL); // USB键盘事件
} else if ( g_Ready_Status.ble == TRUE ) {
OnBoard_SendMsg(hidEmuTaskId, KEY_MESSAGE, 1, NULL); // 蓝牙键盘事件
} else if ( g_Enable_Status.rf == TRUE ) {
OnBoard_SendMsg(RFTaskId, KEY_MESSAGE, 1, NULL); // RF键盘事件
}
}
}
}
Expand Down Expand Up @@ -193,7 +194,7 @@ __attribute__((weak)) void HID_PS2TP_Process(void)
else HIDMouse[2] = tmp;

/* 鼠标事件 */
if ( g_Ready_Status.usb == TRUE ) {
if ( g_Enable_Status.usb == TRUE ) {
OnBoard_SendMsg(usbTaskID, MOUSE_MESSAGE, 1, NULL); // 蓝牙鼠标事件
} else if ( g_Ready_Status.ble == TRUE ) {
OnBoard_SendMsg(hidEmuTaskId, MOUSE_MESSAGE, 1, NULL); // 蓝牙鼠标事件
Expand Down Expand Up @@ -232,7 +233,7 @@ __attribute__((weak)) void HID_I2CTP_Process(void)
else HIDMouse[2] = tmp;

/* 鼠标事件 */
if ( g_Ready_Status.usb == TRUE ) {
if ( g_Enable_Status.usb == TRUE ) {
OnBoard_SendMsg(usbTaskID, MOUSE_MESSAGE, 1, NULL); // USB鼠标事件
} else if ( g_Ready_Status.ble == TRUE ) {
OnBoard_SendMsg(hidEmuTaskId, MOUSE_MESSAGE, 1, NULL); //蓝牙鼠标事件
Expand All @@ -259,7 +260,7 @@ __attribute__((weak)) void HID_CapMouse_Process(void)
oper_dat.cap_mouse_data_change = FALSE;
MPR121_set_result(&oper_dat);
TP78_Idle_Clr();
if ( g_Ready_Status.usb == TRUE ) {
if ( g_Enable_Status.usb == TRUE ) {
OnBoard_SendMsg(usbTaskID, MOUSE_MESSAGE, 1, NULL); // USB鼠标事件
} else if ( g_Ready_Status.ble == TRUE ) {
OnBoard_SendMsg(hidEmuTaskId, MOUSE_MESSAGE, 1, NULL); // 蓝牙鼠标事件
Expand Down Expand Up @@ -324,7 +325,7 @@ __attribute__((weak)) void SW_OLED_LEDStatus_Process(void)
{
uint8_t change_flag = 0;

if ( g_Ready_Status.usb == TRUE ) {
if ( g_Enable_Status.usb == TRUE ) {
if ( g_CapsLock_LEDOn_Status.usb != g_CapsLock_LEDOn_Status.ui ) {
g_CapsLock_LEDOn_Status.ui = g_CapsLock_LEDOn_Status.usb;
change_flag |= 0x2;
Expand Down
2 changes: 1 addition & 1 deletion mounriver_project/KEYBOARD_CH582M/HAL/include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
* 默认配置值
*/
#ifndef FIRMWARE_VERSION
#define FIRMWARE_VERSION "v2_1_3"
#define FIRMWARE_VERSION "v2_1_4"
#endif
#ifndef BLE_MAC
#define BLE_MAC FALSE
Expand Down
Binary file modified mounriver_project/KEYBOARD_CH582M/LIB/LIBTP78_TPM.a
Binary file not shown.
Binary file modified mounriver_project/KEYBOARD_CH582M/obj/BLE_CH582M.bin
Binary file not shown.
Binary file modified mounriver_project/KEYBOARD_CH582M/obj/BLE_CH582M.elf
Binary file not shown.
Loading

0 comments on commit 1881c02

Please sign in to comment.