0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 14:48:03 +03:00

Lots n lots

This commit is contained in:
OneOfEleven
2023-10-29 22:33:38 +00:00
parent 230fdccf10
commit f3e347bc5a
39 changed files with 951 additions and 770 deletions

View File

@ -25,7 +25,8 @@
uint8_t g_ptt_debounce;
uint8_t g_key_debounce_press;
uint8_t g_key_debounce_repeat;
key_code_t g_key_prev = KEY_INVALID;
key_code_t g_key_prev = KEY_INVALID;
key_code_t g_key_pressed = KEY_INVALID;
bool g_key_held;
bool g_fkey_pressed;
bool g_ptt_is_pressed;
@ -124,9 +125,7 @@ key_code_t KEYBOARD_Poll(void)
for (i = 0, k = 0, reg = 0; i < 3 && k < 8; i++, k++)
{
uint16_t reg2;
SYSTICK_DelayUs(1);
reg2 = GPIOA->DATA;
if (reg != reg2)
{ // noise
@ -159,5 +158,7 @@ key_code_t KEYBOARD_Poll(void)
GPIO_ClearBit(&GPIOA->DATA, GPIOA_PIN_KEYBOARD_6);
GPIO_SetBit( &GPIOA->DATA, GPIOA_PIN_KEYBOARD_7);
g_key_pressed = Key;
return Key;
}