qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.22k stars 39.21k forks source link

[Error] 'RESET' undeclared here (not in a function) #19747

Closed chiboreache closed 1 year ago

chiboreache commented 1 year ago

Describe the Bug

There is the RESET quantum keycode that you can use. But if you want to reset the board as part of a macro, rather than hitting a key separately, you can do that.

qmk compile

Compiling: quantum/keymap_introspection.c                                                          In file included from ./.build/obj_dz60/src/default_keyboard.h:30,
from ./keyboards/dz60/keymaps/chiboreache/keymap.c:1,
from quantum/keymap_introspection.c:5:
./keyboards/dz60/keymaps/chiboreache/keymap.c:143:145: error: 'RESET' undeclared here (not in a function)
143 |         _______        , KC_F1  , KC_F2  , KC_F3  , KC_F4  , KC_F5   , KC_F6  , KC_F7  , KC_F8  , KC_F9  , KC_F10  , KC_F11 , KC_F12 , _______, RESET,
|                                                                                                                                                 ^~~~~

Keyboard Used

dz60

Link to product page (if applicable)

No response

Operating System

Arch Linux

qmk doctor Output

➜  ~ qmk doctor
Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.1.1
Ψ QMK home: /home/chibo/qmk_firmware
Ψ Detected Linux.
Ψ Git branch: master
Ψ Repo version: 0.19.11
⚠ Git has unstashed/uncommitted changes.
Ψ - Latest master: 2023-02-02 18:14:26 -0800 (17409dad54) -- Format code according to conventions (#19739)
Ψ - Latest upstream/master: 2023-02-02 18:14:26 -0800 (17409dad54) -- Format code according to conventions (#19739)
Ψ - Latest upstream/develop: None
Ψ - Common ancestor with upstream/master: 2023-02-02 18:14:26 -0800 (17409dad54) -- Format code according to conventions (#19739)
Ψ - Common ancestor with upstream/develop: None
Ψ All dependencies are installed.
Ψ Found arm-none-eabi-gcc version 12.2.0
Ψ Found avr-gcc version 12.2.0
⚠ We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.
Ψ Found avrdude version 7.0
Ψ Found dfu-util version 0.11
Ψ Found dfu-programmer version 0.7.2
Ψ Submodules are up to date.
Ψ Submodule status:
Ψ - lib/chibios: 2022-09-18 10:01:17 +0000 --  (0e9d558b5)
Ψ - lib/chibios-contrib: 2022-10-03 18:09:41 +0200 --  (bb8356fb)
Ψ - lib/googletest: 2021-06-11 06:37:43 -0700 --  (e2239ee6)
Ψ - lib/lufa: 2022-08-26 12:09:55 +1000 --  (549b97320)
Ψ - lib/pico-sdk: 2022-09-19 18:02:44 +0200 --  (8d56ea3)
Ψ - lib/printf: 2022-06-29 23:59:58 +0300 --  (c2e3b4e)
Ψ - lib/vusb: 2022-06-13 09:18:17 +1000 --  (819dbc1)
Ψ QMK is ready to go, but minor problems were found

Is AutoHotKey / Karabiner installed

Other keyboard-related software installed

No response

Additional Context

No response

lesshonor commented 1 year ago

Please review the current documentation: https://docs.qmk.fm/#/ref_functions?id=resetting-the-keyboard

There is the QK_REBOOT or QK_RBT quantum keycode that you can use. But if you want to reset the board as part of a macro, rather than hitting a key separately, you can do that.

(That said, you probably want QK_BOOT.)

chiboreache commented 1 year ago

@lesshonor thanks! it works

therefore fix https://docs.qmk.fm/#/ref_functions?id=resetting-the-keyboard