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_code.h | |
| 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_code.h')
| -rw-r--r-- | tmk_core/common/action_code.h | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h index fe2735b973..d836b7a8a3 100644 --- a/tmk_core/common/action_code.h +++ b/tmk_core/common/action_code.h | |||
| @@ -17,10 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 17 | #ifndef ACTION_CODE_H | 17 | #ifndef ACTION_CODE_H |
| 18 | #define ACTION_CODE_H | 18 | #define ACTION_CODE_H |
| 19 | 19 | ||
| 20 | /* Action codes | 20 | /** \brief Action codes |
| 21 | * ============ | ||
| 22 | * 16bit code: action_kind(4bit) + action_parameter(12bit) | ||
| 23 | * | 21 | * |
| 22 | * 16bit code: action_kind(4bit) + action_parameter(12bit) | ||
| 24 | * | 23 | * |
| 25 | * Key Actions(00xx) | 24 | * Key Actions(00xx) |
| 26 | * ----------------- | 25 | * ----------------- |
| @@ -38,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 38 | * 001r|mods|0000 00xx (reserved) | 37 | * 001r|mods|0000 00xx (reserved) |
| 39 | * 001r|mods| keycode Modifiers with Tap Key(Dual role) | 38 | * 001r|mods| keycode Modifiers with Tap Key(Dual role) |
| 40 | * | 39 | * |
| 41 | * | ||
| 42 | * Other Keys(01xx) | 40 | * Other Keys(01xx) |
| 43 | * ---------------- | 41 | * ---------------- |
| 44 | * ACT_USAGE(0100): TODO: Not needed? | 42 | * ACT_USAGE(0100): TODO: Not needed? |
| @@ -47,17 +45,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 47 | * 0100|10| usage(10) (reserved) | 45 | * 0100|10| usage(10) (reserved) |
| 48 | * 0100|11| usage(10) (reserved) | 46 | * 0100|11| usage(10) (reserved) |
| 49 | * | 47 | * |
| 50 | * | ||
| 51 | * ACT_MOUSEKEY(0101): TODO: Merge these two actions to conserve space? | 48 | * ACT_MOUSEKEY(0101): TODO: Merge these two actions to conserve space? |
| 52 | * 0101|xxxx| keycode Mouse key | 49 | * 0101|xxxx| keycode Mouse key |
| 53 | * | 50 | * |
| 54 | * ACT_SWAP_HANDS(0110): | 51 | * ACT_SWAP_HANDS(0110): |
| 55 | * 0110|xxxx| keycode Swap hands (keycode on tap, or options) | 52 | * 0110|xxxx| keycode Swap hands (keycode on tap, or options) |
| 56 | * | 53 | * |
| 57 | * | ||
| 58 | * 0111|xxxx xxxx xxxx (reserved) | 54 | * 0111|xxxx xxxx xxxx (reserved) |
| 59 | * | 55 | * |
| 60 | * | ||
| 61 | * Layer Actions(10xx) | 56 | * Layer Actions(10xx) |
| 62 | * ------------------- | 57 | * ------------------- |
| 63 | * ACT_LAYER(1000): | 58 | * ACT_LAYER(1000): |
| @@ -84,7 +79,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 84 | * 101E|LLLL|1111 xxxx Reserved (0xF5-FF) | 79 | * 101E|LLLL|1111 xxxx Reserved (0xF5-FF) |
| 85 | * ELLLL: layer 0-31(E: extra bit for layer 16-31) | 80 | * ELLLL: layer 0-31(E: extra bit for layer 16-31) |
| 86 | * | 81 | * |
| 87 | * | ||
| 88 | * Extensions(11xx) | 82 | * Extensions(11xx) |
| 89 | * ---------------- | 83 | * ---------------- |
| 90 | * ACT_MACRO(1100): | 84 | * ACT_MACRO(1100): |
| @@ -126,7 +120,7 @@ enum action_kind_id { | |||
| 126 | }; | 120 | }; |
| 127 | 121 | ||
| 128 | 122 | ||
| 129 | /* Action Code Struct | 123 | /** \brief Action Code Struct |
| 130 | * | 124 | * |
| 131 | * NOTE: | 125 | * NOTE: |
| 132 | * In avr-gcc bit field seems to be assigned from LSB(bit0) to MSB(bit15). | 126 | * In avr-gcc bit field seems to be assigned from LSB(bit0) to MSB(bit15). |
| @@ -198,10 +192,9 @@ typedef union { | |||
| 198 | #define ACTION(kind, param) ((kind)<<12 | (param)) | 192 | #define ACTION(kind, param) ((kind)<<12 | (param)) |
| 199 | 193 | ||
| 200 | 194 | ||
| 201 | /* | 195 | /** \brief Key Actions |
| 202 | * Key Actions | 196 | * |
| 203 | */ | 197 | * Mod bits: 43210 |
| 204 | /* Mod bits: 43210 | ||
| 205 | * bit 0 ||||+- Control | 198 | * bit 0 ||||+- Control |
| 206 | * bit 1 |||+-- Shift | 199 | * bit 1 |||+-- Shift |
| 207 | * bit 2 ||+--- Alt | 200 | * bit 2 ||+--- Alt |
| @@ -230,8 +223,7 @@ enum mods_codes { | |||
| 230 | #define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | MODS_TAP_TOGGLE) | 223 | #define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | MODS_TAP_TOGGLE) |
| 231 | 224 | ||
| 232 | 225 | ||
| 233 | /* | 226 | /** \brief Other Keys |
| 234 | * Other Keys | ||
| 235 | */ | 227 | */ |
| 236 | enum usage_pages { | 228 | enum usage_pages { |
| 237 | PAGE_SYSTEM, | 229 | PAGE_SYSTEM, |
| @@ -243,20 +235,25 @@ enum usage_pages { | |||
| 243 | 235 | ||
| 244 | 236 | ||
| 245 | 237 | ||
| 246 | /* | 238 | /** \brief Layer Actions |
| 247 | * Layer Actions | ||
| 248 | */ | 239 | */ |
| 249 | enum layer_param_on { | 240 | enum layer_param_on { |
| 250 | ON_PRESS = 1, | 241 | ON_PRESS = 1, |
| 251 | ON_RELEASE = 2, | 242 | ON_RELEASE = 2, |
| 252 | ON_BOTH = 3, | 243 | ON_BOTH = 3, |
| 253 | }; | 244 | }; |
| 245 | |||
| 246 | /** \brief Layer Actions | ||
| 247 | */ | ||
| 254 | enum layer_param_bit_op { | 248 | enum layer_param_bit_op { |
| 255 | OP_BIT_AND = 0, | 249 | OP_BIT_AND = 0, |
| 256 | OP_BIT_OR = 1, | 250 | OP_BIT_OR = 1, |
| 257 | OP_BIT_XOR = 2, | 251 | OP_BIT_XOR = 2, |
| 258 | OP_BIT_SET = 3, | 252 | OP_BIT_SET = 3, |
| 259 | }; | 253 | }; |
| 254 | |||
| 255 | /** \brief Layer Actions | ||
| 256 | */ | ||
| 260 | enum layer_param_tap_op { | 257 | enum layer_param_tap_op { |
| 261 | OP_TAP_TOGGLE = 0xF0, | 258 | OP_TAP_TOGGLE = 0xF0, |
| 262 | OP_ON_OFF, | 259 | OP_ON_OFF, |
| @@ -296,8 +293,7 @@ enum layer_param_tap_op { | |||
| 296 | #define ACTION_DEFAULT_LAYER_BIT_SET(part, bits) ACTION_LAYER_BITOP(OP_BIT_SET, (part), (bits), 0) | 293 | #define ACTION_DEFAULT_LAYER_BIT_SET(part, bits) ACTION_LAYER_BITOP(OP_BIT_SET, (part), (bits), 0) |
| 297 | 294 | ||
| 298 | 295 | ||
| 299 | /* | 296 | /** \brief Extensions |
| 300 | * Extensions | ||
| 301 | */ | 297 | */ |
| 302 | enum backlight_opt { | 298 | enum backlight_opt { |
| 303 | BACKLIGHT_INCREASE = 0, | 299 | BACKLIGHT_INCREASE = 0, |
