Skip to content

Commit ff89703

Browse files
committed
input: define optional functions when generating documentation
Add a defined(__DOXYGEN__) condition for the optional APIs so that they get included in the documentation. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 4307882 commit ff89703

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

include/zephyr/input/input_kbd_matrix.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ typedef uint8_t kbd_row_t;
3838
#define PRIkbdrow "%02x"
3939
#endif
4040

41-
#if CONFIG_INPUT_KBD_ACTUAL_KEY_MASK_DYNAMIC
41+
#if defined(CONFIG_INPUT_KBD_ACTUAL_KEY_MASK_DYNAMIC) || defined(__DOXYGEN__)
4242
#define INPUT_KBD_ACTUAL_KEY_MASK_CONST
4343
/**
4444
* @brief Enables or disables a specific row, column combination in the actual
@@ -47,7 +47,8 @@ typedef uint8_t kbd_row_t;
4747
* This allows enabling or disabling spcific row, column combination in the
4848
* actual key mask in runtime. It can be useful if some of the keys are not
4949
* present in some configuration, and the specific configuration is determined
50-
* in runtime. Requires CONFIG_INPUT_KBD_ACTUAL_KEY_MASK_DYNAMIC=y.
50+
* in runtime. Requires @kconfig{CONFIG_INPUT_KBD_ACTUAL_KEY_MASK_DYNAMIC} to
51+
* be enabled.
5152
*
5253
* @param dev Pointer to the keyboard matrix device.
5354
* @param row The matrix row to enable or disable.
@@ -276,12 +277,13 @@ struct input_kbd_matrix_common_data {
276277
*/
277278
void input_kbd_matrix_poll_start(const struct device *dev);
278279

279-
#ifdef CONFIG_INPUT_KBD_DRIVE_COLUMN_HOOK
280+
#if defined(CONFIG_INPUT_KBD_DRIVE_COLUMN_HOOK) || defined(__DOXYGEN__)
280281
/**
281282
* @brief Drive column hook
282283
*
283284
* This can be implemented by the application to handle column selection
284-
* quirks. Called after the driver specific drive_column function.
285+
* quirks. Called after the driver specific drive_column function. Requires
286+
* @kconfig{CONFIG_INPUT_KBD_DRIVE_COLUMN_HOOK} to be enabled.
285287
*
286288
* @param dev Keyboard matrix device instance.
287289
* @param col The column to drive, or

0 commit comments

Comments
 (0)