diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2018-03-21 23:50:38 -0700 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-03-22 02:50:38 -0400 |
commit | 7c9d5ace143d3cc6d767a354acde814926d566fd (patch) | |
tree | 1f2b581b6c9f6278a9e180bfcc8dd86b0a7fd2ef /tmk_core/common/action.c | |
parent | f0932a8716dc946322c5ebae7f75eaa275c6220c (diff) |
Generate API docs from source code comments (#2491)
* Generate api docs from source code
* Add a bunch of doxygen comments
* more doxygen comments
* Add the in-progress api docs
* script to generate docs from travis
* Add doc generation to the travis job
* make travis_docs.sh commit the work it does
* make sure the docs script exits cleanly
Diffstat (limited to 'tmk_core/common/action.c')
-rw-r--r-- | tmk_core/common/action.c | 63 |
1 files changed, 58 insertions, 5 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 33d920554f..fff8347915 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -44,6 +44,10 @@ int retro_tapping_counter = 0; #include <fauxclicky.h> #endif +/** \brief Called to execute an action. + * + * FIXME: Needs documentation. + */ void action_exec(keyevent_t event) { if (!IS_NOEVENT(event)) { @@ -95,6 +99,10 @@ void action_exec(keyevent_t event) bool swap_hands = false; bool swap_held = false; +/** \brief Process Hand Swap + * + * FIXME: Needs documentation. + */ void process_hand_swap(keyevent_t *event) { static swap_state_row_t swap_state[MATRIX_ROWS]; @@ -134,7 +142,10 @@ bool process_record_quantum(keyrecord_t *record) { } #ifndef NO_ACTION_TAPPING -// Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress. +/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress. + * + * FIXME: Needs documentation. + */ void process_record_tap_hint(keyrecord_t *record) { action_t action = layer_switch_get_action(record->event.key); @@ -154,6 +165,10 @@ void process_record_tap_hint(keyrecord_t *record) } #endif +/** \brief Take a key event (key press or key release) and processes it. + * + * FIXME: Needs documentation. + */ void process_record(keyrecord_t *record) { if (IS_NOEVENT(record->event)) { return; } @@ -172,6 +187,10 @@ void process_record(keyrecord_t *record) process_action(record, action); } +/** \brief Take an action and processes it. + * + * FIXME: Needs documentation. + */ void process_action(keyrecord_t *record, action_t action) { keyevent_t event = record->event; @@ -674,8 +693,9 @@ void process_action(keyrecord_t *record, action_t action) -/* - * Utilities for actions. +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. */ void register_code(uint8_t code) { @@ -755,6 +775,10 @@ void register_code(uint8_t code) } } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void unregister_code(uint8_t code) { if (code == KC_NO) { @@ -810,6 +834,10 @@ void unregister_code(uint8_t code) } } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void register_mods(uint8_t mods) { if (mods) { @@ -818,6 +846,10 @@ void register_mods(uint8_t mods) } } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void unregister_mods(uint8_t mods) { if (mods) { @@ -826,12 +858,20 @@ void unregister_mods(uint8_t mods) } } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void clear_keyboard(void) { clear_mods(); clear_keyboard_but_mods(); } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void clear_keyboard_but_mods(void) { clear_weak_mods(); @@ -848,6 +888,10 @@ void clear_keyboard_but_mods(void) #endif } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ bool is_tap_key(keypos_t key) { action_t action = layer_switch_get_action(key); @@ -880,14 +924,19 @@ bool is_tap_key(keypos_t key) } -/* - * debug print +/** \brief Debug print (FIXME: Needs better description) + * + * FIXME: Needs documentation. */ void debug_event(keyevent_t event) { dprintf("%04X%c(%u)", (event.key.row<<8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); } +/** \brief Debug print (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void debug_record(keyrecord_t record) { debug_event(record.event); @@ -896,6 +945,10 @@ void debug_record(keyrecord_t record) #endif } +/** \brief Debug print (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void debug_action(action_t action) { switch (action.kind.id) { |