Skip to content

Commit

Permalink
update version V2.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
ChnMasterOG committed Apr 10, 2024
1 parent a9e9598 commit 8f7c254
Show file tree
Hide file tree
Showing 12 changed files with 173,690 additions and 173,755 deletions.
6 changes: 6 additions & 0 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,9 @@ You can submit you code [here](https://github.com/ChnMasterOG/tp78_v2/issues). T
        1. SP Keys don't work. Now this bug is fixed.

        2. Add "disable irq" during the trackpoint is read.

- V2.0.15

        1. Modify keyboard bounce codes to avoid duplicate key-codes.

        2. Optimize the judgment of USB HID information transmission status.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,9 @@ C(mounriver_project - wch软件工程) --> J(VLD_CH582M - 主控板测试工程)
        1. 修复SP键无法正常工作的BUG

        2. 增加小红点读取数据期间禁用中断

- V2.0.15

        1. 修改按键弹起逻辑,避免出现重复键码

        2. 优化USB HID信息发送状态的判断
Binary file modified documents/TP78v2指导文档.pdf
Binary file not shown.
5 changes: 4 additions & 1 deletion mounriver_project/KEYBOARD_CH582M/HAL/KEYBOARD.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,11 +739,14 @@ void KEYBOARD_Detection( void )
g_capslock_status.press_Capslock_with_other = FALSE;
} else {
uint8_t p = 2; // 双指针实现删除按键
uint8_t tmp_key;
for (key_idx = 2; key_idx < 8; key_idx++) {
if (KeyboardDat->data[key_idx] != KEY_None) {
if ((KeyboardDat->data[key_idx] != CustomKey[current_row][current_colum] &&
KeyboardDat->data[key_idx] != Extra_CustomKey[current_row][current_colum])) { // 弹起按键2层都清除
KeyboardDat->data[p] = KeyboardDat->data[key_idx];
tmp_key = KeyboardDat->data[key_idx];
KeyboardDat->data[key_idx] = KEY_None;
KeyboardDat->data[p] = tmp_key;
p++;
} else {
KeyboardDat->data[key_idx] = KEY_None;
Expand Down
12 changes: 6 additions & 6 deletions mounriver_project/KEYBOARD_CH582M/HAL/OLED_UI.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,14 @@ void OLED_UI_show_version(uint8_t ena)
{
#ifdef OLED_0_66
if (ena) {
OLED_ShowString(OLED_Midx(8, 0, 64), 2, "Firmware");
OLED_ShowString(OLED_Midx(6, 0, 64), 3, FIRMWARE_VERSION);
OLED_ShowString(OLED_Midx(8, 0, 64), 4, "Designers");
OLED_ShowString(0, 5, "Qi.C, Chengwei.L");
OLED_Scroll(5, 5, 16, 48, 2, 1, 0);
OLED_ShowString(OLED_Midx(strlen("Firmware"), 0, 64), 2, "Firmware");
OLED_ShowString(OLED_Midx(strlen(FIRMWARE_VERSION), 0, 64), 3, FIRMWARE_VERSION);
OLED_ShowString(OLED_Midx(strlen("Designers"), 0, 64), 4, "Designers");
OLED_ShowString(OLED_Midx(strlen("Q.C, CW.L"), 0, 64), 5, "Q.C, CW.L");
//-OLED_Scroll(5, 5, 16, 48, 2, 1, 0);
} else {
OLED_Clr(0, 2, 63, 8);
OLED_WR_Byte(0x2E, OLED_CMD); // 停止滚动
//-OLED_WR_Byte(0x2E, OLED_CMD); // 停止滚动
}
#endif
}
Expand Down
15 changes: 9 additions & 6 deletions mounriver_project/KEYBOARD_CH582M/HAL/USB.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,10 @@ tmosEvents USB_ProcessEvent( tmosTaskID task_id, tmosEvents events )
if ( events & USB_KEYBOARD_EVENT )
{
if (hid_state.keyboard_hid_state != HID_STATE_BUSY) {
hid_state.keyboard_hid_state = HID_STATE_BUSY;
ret = usbd_ep_start_write(USBD_IF0_AL0_EP0_ADDR, HIDKeyboard, HID_KEYBOARD_DATA_LENGTH);
if (ret >= 0) {
hid_state.keyboard_hid_state = HID_STATE_BUSY;
if (ret < 0) {
hid_state.keyboard_hid_state = HID_STATE_IDLE;
}
}
return events ^ USB_KEYBOARD_EVENT;
Expand All @@ -802,9 +803,10 @@ tmosEvents USB_ProcessEvent( tmosTaskID task_id, tmosEvents events )
if ( events & USB_MOUSE_EVENT )
{
if (hid_state.mouse_hid_state != HID_STATE_BUSY) {
hid_state.mouse_hid_state = HID_STATE_BUSY;
ret = usbd_ep_start_write(USBD_IF1_AL0_EP0_ADDR, HIDMouse, HID_MOUSE_DATA_LENGTH);
if (ret >= 0) {
hid_state.mouse_hid_state = HID_STATE_BUSY;
if (ret < 0) {
hid_state.mouse_hid_state = HID_STATE_IDLE;
}
}
return events ^ USB_MOUSE_EVENT;
Expand All @@ -813,9 +815,10 @@ tmosEvents USB_ProcessEvent( tmosTaskID task_id, tmosEvents events )
if ( events & USB_VOL_EVENT )
{
if (hid_state.vol_hid_state != HID_STATE_BUSY) {
hid_state.vol_hid_state = HID_STATE_BUSY;
ret = usbd_ep_start_write(USBD_IF2_AL0_EP0_ADDR, HIDVolume, HID_VOLUME_DATA_LENGTH);
if (ret >= 0) {
hid_state.vol_hid_state = HID_STATE_BUSY;
if (ret < 0) {
hid_state.vol_hid_state = HID_STATE_IDLE;
}
}
return events ^ USB_VOL_EVENT;
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_0_14"
#define FIRMWARE_VERSION "v2_0_15"
#endif
#ifndef BLE_MAC
#define BLE_MAC FALSE
Expand Down
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 8f7c254

Please sign in to comment.