From e95646efd0259e89ed640a593eeb7d05b6a50946 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 18 Dec 2018 09:58:42 +0100 Subject: [PATCH] Hardware: Remove duplicated documentation Methods that originate from the `kaleidoscope::Hardware` base class need not be documented every time they're being overridden. That leads to duplication, and higher chance of documentation going stale. As such, remove such cases, and rely on the base class having plenty of documentation instead. Signed-off-by: Gergely Nagy --- src/kaleidoscope/hardware/ATMegaKeyboard.h | 47 +------------------ src/kaleidoscope/hardware/ez/ErgoDox.h | 38 --------------- .../hardware/keyboardio/Model01.h | 38 --------------- 3 files changed, 2 insertions(+), 121 deletions(-) diff --git a/src/kaleidoscope/hardware/ATMegaKeyboard.h b/src/kaleidoscope/hardware/ATMegaKeyboard.h index 13d56483..88320fe4 100644 --- a/src/kaleidoscope/hardware/ATMegaKeyboard.h +++ b/src/kaleidoscope/hardware/ATMegaKeyboard.h @@ -75,60 +75,17 @@ class ATMegaKeyboard : public kaleidoscope::Hardware { public: ATMegaKeyboard(void) {} - // these will be overridden by the subclass static uint8_t debounce; void setup(void); - void readMatrix(void); + void actOnMatrixScan(); + void scanMatrix(); - /** - * Check the number of key switches currently pressed. - * - * @returns the number of keys pressed. - */ uint8_t pressedKeyswitchCount(); - - /** Key switch states - * - * These methods offer a way to peek at the key switch states, for those cases - * where we need to deal with the state closest to the hardware. Some methods - * offer a way to check if a key is pressed, others return the number of - * pressed keys. - */ - /** - * Check if a key is pressed at a given position. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - * - * @returns true if the key is pressed, false otherwise. - */ bool isKeyswitchPressed(uint8_t row, byte col); - - /** - * Check if a key is pressed at a given position. - * - * @param keyIndex is the key index, as calculated by `keyIndex`. - * - * @note Key indexes start at 1, not 0! - * - * @returns true if the key is pressed, false otherwise. - */ bool isKeyswitchPressed(uint8_t keyIndex); - void actOnMatrixScan(); - void scanMatrix(); - - /* Key masking - * ----------- - * - * There are situations when one wants to ignore key events for a while, and - * mask them out. These functions help do that. In isolation, they do nothing, - * plugins and the core firmware is expected to make use of these. - * - * See `handleKeyswitchEvent` in the Kaleidoscope sources for a use-case. - */ void maskKey(byte row, byte col); void unMaskKey(byte row, byte col); bool isKeyMasked(byte row, byte col); diff --git a/src/kaleidoscope/hardware/ez/ErgoDox.h b/src/kaleidoscope/hardware/ez/ErgoDox.h index ff765d37..87249560 100644 --- a/src/kaleidoscope/hardware/ez/ErgoDox.h +++ b/src/kaleidoscope/hardware/ez/ErgoDox.h @@ -61,50 +61,12 @@ class ErgoDox : public kaleidoscope::Hardware { void actOnMatrixScan(void); void setup(); - /* Key masking - * ----------- - * - * There are situations when one wants to ignore key events for a while, and - * mask them out. These functions help do that. In isolation, they do nothing, - * plugins and the core firmware is expected to make use of these. - * - * See `handleKeyswitchEvent` in the Kaleidoscope sources for a use-case. - */ void maskKey(byte row, byte col); void unMaskKey(byte row, byte col); bool isKeyMasked(byte row, byte col); - /** Key switch states - * - * These methods offer a way to peek at the key switch states, for those cases - * where we need to deal with the state closest to the hardware. Some methods - * offer a way to check if a key is pressed, others return the number of - * pressed keys. - */ - /** - * Check if a key is pressed at a given position. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - * - * @returns true if the key is pressed, false otherwise. - */ bool isKeyswitchPressed(byte row, byte col); - /** - * Check if a key is pressed at a given position. - * - * @param keyIndex is the key index, as calculated by `keyIndex`. - * - * @note Key indexes start at 1, not 0! - * - * @returns true if the key is pressed, false otherwise. - */ bool isKeyswitchPressed(uint8_t keyIndex); - /** - * Check the number of key switches currently pressed. - * - * @returns the number of keys pressed. - */ uint8_t pressedKeyswitchCount(); // ErgoDox-specific stuff diff --git a/src/kaleidoscope/hardware/keyboardio/Model01.h b/src/kaleidoscope/hardware/keyboardio/Model01.h index 0360e8cc..5457f87b 100644 --- a/src/kaleidoscope/hardware/keyboardio/Model01.h +++ b/src/kaleidoscope/hardware/keyboardio/Model01.h @@ -63,51 +63,13 @@ class Model01 : public kaleidoscope::Hardware { void setKeyscanInterval(uint8_t interval); boolean ledPowerFault(void); - /* Key masking - * ----------- - * - * There are situations when one wants to ignore key events for a while, and - * mask them out. These functions help do that. In isolation, they do nothing, - * plugins and the core firmware is expected to make use of these. - * - * See `handleKeyswitchEvent` in the Kaleidoscope sources for a use-case. - */ void maskKey(byte row, byte col); void unMaskKey(byte row, byte col); bool isKeyMasked(byte row, byte col); void maskHeldKeys(void); - /** Key switch states - * - * These methods offer a way to peek at the key switch states, for those cases - * where we need to deal with the state closest to the hardware. Some methods - * offer a way to check if a key is pressed, others return the number of - * pressed keys. - */ - /** - * Check if a key is pressed at a given position. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - * - * @returns true if the key is pressed, false otherwise. - */ bool isKeyswitchPressed(byte row, byte col); - /** - * Check if a key is pressed at a given position. - * - * @param keyIndex is the key index, as calculated by `keyIndex`. - * - * @note Key indexes start at 1, not 0! - * - * @returns true if the key is pressed, false otherwise. - */ bool isKeyswitchPressed(uint8_t keyIndex); - /** - * Check the number of key switches currently pressed. - * - * @returns the number of keys pressed. - */ uint8_t pressedKeyswitchCount(); keydata_t leftHandState;