Skip to content

Commit

Permalink
update firmware to V2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ChnMasterOG committed Jun 16, 2024
1 parent 8f7c254 commit 5c6ea6a
Show file tree
Hide file tree
Showing 70 changed files with 483,992 additions and 454,350 deletions.
12 changes: 12 additions & 0 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,15 @@ You can submit you code [here](https://github.com/ChnMasterOG/tp78_v2/issues). T
        1. Modify keyboard bounce codes to avoid duplicate key-codes.

        2. Optimize the judgment of USB HID information transmission status.

- V2.1.1

        1. Optimize HID encoding logic when pressing buttons and update I2C driver.

        2. Update WCH SDK to the January 2024 version.

        3. **After updated this version, the Numlock status will be displayed on OLED in RF mode. When the signal is poor and packet loss occurs, the keyboard will automatically initiate a retransmission. The default retransmission time is 10ms, which can be modified through the RF_chk_ms parameter. This function needs to be synchronized and upgraded with the receiver firmware before it can take effect.**

        4. Adapt to miniFOC and TP78mini expansion modules.

        5. Update low power codes.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,15 @@ C(mounriver_project - wch软件工程) --> J(VLD_CH582M - 主控板测试工程)
        1. 修改按键弹起逻辑,避免出现重复键码

        2. 优化USB HID信息发送状态的判断

- V2.1.1

        1. 【代码逻辑优化和稳定性】优化按键按下时 HID 编码逻辑,更新 I2C 驱动

        2. 【SDK 更新】更新 WCH SDK 至 2024 年 1 月版本

        3. **【优化 2.4G 连接】更新版本后 RF 模式下 Numlock 状态会被显示在 OLED,当信号不好出现丢包后键盘会自动发起重传,默认发起重传时间为 10ms,可以通过 RF_chk_ms 参数修改时间,该功能需要同步升级接收器固件后才能生效**

        4. 【扩展模块协议】适配 miniFOC 和 TP78mini 扩展模块

        5. 【低功耗相关】低功耗相关代码更新
Binary file modified documents/TP78v2指导文档.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1758284591504836711" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1093777715953807195" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
68 changes: 34 additions & 34 deletions mounriver_project/KEYBOARD_CH582M/APP/include/snake.h
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
/********************************** (C) COPYRIGHT *******************************
* File Name : snake.h
* Author : ChnMasterOG
* Version : V1.0
* Date : 2022/1/28
* Description : 应用层 - 贪吃蛇游戏头文件
* Copyright (c) 2023 ChnMasterOG
* SPDX-License-Identifier: GPL-3.0
*******************************************************************************/

#ifndef SNAKE_H
#define SNAKE_H

#define MAX_SNAKE_LENGTH 30 // 最长蛇长

typedef enum {
DirUp = 1,
DirDown,
DirLeft,
DirRight,
}SnakeDir;

typedef struct {
uint8_t PosX;
uint8_t PosY;
}SnakePos;

extern uint8_t BodyDir[MAX_SNAKE_LENGTH];

void Snake_Init( void );
void MoveSnake( void );

#endif

/********************************** (C) COPYRIGHT *******************************
* File Name : snake.h
* Author : ChnMasterOG
* Version : V1.0
* Date : 2022/1/28
* Description : 应用层 - 贪吃蛇游戏头文件
* Copyright (c) 2023 ChnMasterOG
* SPDX-License-Identifier: GPL-3.0
*******************************************************************************/

#ifndef SNAKE_H
#define SNAKE_H

#define MAX_SNAKE_LENGTH 10 // 最长蛇长

typedef enum {
DirUp = 1,
DirDown,
DirLeft,
DirRight,
}SnakeDir;

typedef struct {
uint8_t PosX;
uint8_t PosY;
}SnakePos;

extern uint8_t BodyDir[MAX_SNAKE_LENGTH];

void Snake_Init( void );
void MoveSnake( void );

#endif
2 changes: 1 addition & 1 deletion mounriver_project/KEYBOARD_CH582M/APP/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void GPIOA_IRQHandler(void)
{
#if (ROW_SCAN_MODE)
if (g_Enable_Status.sleep == TRUE) {
TP78Reinit(1, g_lp_type);
wakeup_flag = TRUE;
}
GPIOA_ClearITFlagBit(Colum_Pin_ALL); // 用于唤醒
#endif
Expand Down
4 changes: 3 additions & 1 deletion mounriver_project/KEYBOARD_CH582M/HAL/CORE.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void APPJumpKBoot(void)
* Input : 无
* Return : 无
*******************************************************************************/
#ifndef LOW_MEM
__HIGH_CODE
void APPJumpBoot(void) //此段代码必须运行在RAM中
{
Expand All @@ -53,6 +54,7 @@ void APPJumpBoot(void) //此段代码必须运行在RAM中
R8_SAFE_ACCESS_SIG = 0;//进入后执行复位,复位类型为上电复位
while(1);//营造空片的现象,启动时就会停在BOOT,等烧写,超时时间10s
}
#endif

/*******************************************************************************
* Function Name : SoftReset
Expand Down Expand Up @@ -241,6 +243,7 @@ void GotoLowpower(enum LP_Type type)
LowPower_Idle();
break;
case lp_sw_mode: // 软件低功耗处理
case lp_no_sleep_mode:
TP78Reinit(0, type);
break;
case lp_halt_mode: // 暂停模式 - 320uA
Expand All @@ -260,7 +263,6 @@ void GotoLowpower(enum LP_Type type)
default: // do not run here
return;
}
g_Enable_Status.sleep = TRUE;
#else
return;
#endif
Expand Down
1 change: 1 addition & 0 deletions mounriver_project/KEYBOARD_CH582M/HAL/FATFS.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const BYTE WriteBuffer[] = {
"LINE16:是否使能触摸条触发鼠标按键(0~1)\n"
"LINE17:进入屏保时间/s(1~65536)\n"
"LINE18:进入休眠时间/s(1~65536)\n"
"LINE19:RF模式下重传检查间隔/ms(1~255)\n"
"keyboard_spkey.txt---存放sp按键映射键位(每行8byte)\n"
"LINE1:spKEY1的HID报表数据\n"
"LINE2:spKEY2的HID报表数据\n"
Expand Down
Loading

0 comments on commit 5c6ea6a

Please sign in to comment.