Browse Source

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
pjones-keymap
skullydazed 1 year ago
parent
commit
7c9d5ace14

+ 2
- 1
.gitignore View File

@@ -23,6 +23,7 @@ quantum/version.h
23 23
 .idea/
24 24
 CMakeLists.txt
25 25
 cmake-build-debug
26
+doxygen/
26 27
 .DS_STORE
27 28
 /util/wsl_downloaded
28 29
 /util/win_downloaded
@@ -65,4 +66,4 @@ util/Win_Check_Output.txt
65 66
 # things travis sees
66 67
 secrets.tar
67 68
 id_rsa_*
68
-/.vs
69
+/.vs

+ 3
- 0
.travis.yml View File

@@ -15,11 +15,13 @@ before_install:
15 15
 install:
16 16
   - tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
17 17
   - export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
18
+  - npm install -g moxygen
18 19
 before_script:
19 20
   - avr-gcc --version
20 21
 script:
21 22
 - make test:all AUTOGEN=false
22 23
 - bash util/travis_build.sh
24
+- bash util/travis_docs.sh
23 25
 addons:
24 26
   apt:
25 27
     packages:
@@ -30,6 +32,7 @@ addons:
30 32
     - libnewlib-arm-none-eabi
31 33
     - diffutils
32 34
     - dos2unix
35
+    - doxygen
33 36
 after_success: 
34 37
   bash util/travis_compiled_push.sh
35 38
 notifications:

+ 266
- 0
Doxyfile View File

@@ -0,0 +1,266 @@
1
+# Doxyfile 1.8.14
2
+
3
+# This file describes the settings to be used by the documentation system
4
+# doxygen (www.doxygen.org) for qmk_firmware (github.com/qmk/qmk_firmware)
5
+#
6
+# All text after a double hash (##) is considered a comment and is placed in
7
+# front of the TAG it is preceding.
8
+#
9
+# All text after a single hash (#) is considered a comment and will be ignored.
10
+# The format is:
11
+# TAG = value [value, ...]
12
+# For lists, items can also be appended using:
13
+# TAG += value [value, ...]
14
+# Values that contain spaces should be placed between quotes (\" \").
15
+
16
+#---------------------------------------------------------------------------
17
+# Project related configuration options
18
+#---------------------------------------------------------------------------
19
+
20
+DOXYFILE_ENCODING      = UTF-8
21
+PROJECT_NAME           = "QMK Firmware"
22
+PROJECT_NUMBER         = https://github.com/qmk/qmk_firmware
23
+PROJECT_BRIEF          = "Keyboard controller firmware for Atmel AVR and ARM USB families"
24
+OUTPUT_DIRECTORY       = doxygen
25
+ALLOW_UNICODE_NAMES    = NO
26
+OUTPUT_LANGUAGE        = English
27
+BRIEF_MEMBER_DESC      = YES
28
+REPEAT_BRIEF           = YES
29
+ABBREVIATE_BRIEF       = "The $name class" \
30
+                         "The $name widget" \
31
+                         "The $name file" \
32
+                         is \
33
+                         provides \
34
+                         specifies \
35
+                         contains \
36
+                         represents \
37
+                         a \
38
+                         an \
39
+                         the
40
+ALWAYS_DETAILED_SEC    = NO
41
+INLINE_INHERITED_MEMB  = NO
42
+FULL_PATH_NAMES        = YES
43
+STRIP_FROM_PATH        = 
44
+STRIP_FROM_INC_PATH    = 
45
+SHORT_NAMES            = NO
46
+JAVADOC_AUTOBRIEF      = NO
47
+QT_AUTOBRIEF           = NO
48
+MULTILINE_CPP_IS_BRIEF = NO
49
+INHERIT_DOCS           = YES
50
+SEPARATE_MEMBER_PAGES  = NO
51
+TAB_SIZE               = 4
52
+ALIASES                = 
53
+TCL_SUBST              = 
54
+OPTIMIZE_OUTPUT_FOR_C  = YES
55
+OPTIMIZE_OUTPUT_JAVA   = NO
56
+OPTIMIZE_FOR_FORTRAN   = NO
57
+OPTIMIZE_OUTPUT_VHDL   = NO
58
+EXTENSION_MAPPING      = 
59
+MARKDOWN_SUPPORT       = YES
60
+TOC_INCLUDE_HEADINGS   = 2
61
+AUTOLINK_SUPPORT       = YES
62
+BUILTIN_STL_SUPPORT    = NO
63
+CPP_CLI_SUPPORT        = NO
64
+SIP_SUPPORT            = NO
65
+IDL_PROPERTY_SUPPORT   = YES
66
+DISTRIBUTE_GROUP_DOC   = NO
67
+GROUP_NESTED_COMPOUNDS = NO
68
+SUBGROUPING            = YES
69
+INLINE_GROUPED_CLASSES = NO
70
+INLINE_SIMPLE_STRUCTS  = NO
71
+TYPEDEF_HIDES_STRUCT   = NO
72
+LOOKUP_CACHE_SIZE      = 0
73
+
74
+#---------------------------------------------------------------------------
75
+# Build related configuration options
76
+#---------------------------------------------------------------------------
77
+
78
+EXTRACT_ALL            = NO
79
+EXTRACT_PRIVATE        = NO
80
+EXTRACT_PACKAGE        = NO
81
+EXTRACT_STATIC         = NO
82
+EXTRACT_LOCAL_CLASSES  = YES
83
+EXTRACT_LOCAL_METHODS  = NO
84
+EXTRACT_ANON_NSPACES   = NO
85
+HIDE_UNDOC_MEMBERS     = NO
86
+HIDE_UNDOC_CLASSES     = NO
87
+HIDE_FRIEND_COMPOUNDS  = NO
88
+HIDE_IN_BODY_DOCS      = NO
89
+INTERNAL_DOCS          = NO
90
+CASE_SENSE_NAMES       = NO
91
+HIDE_SCOPE_NAMES       = YES
92
+HIDE_COMPOUND_REFERENCE= NO
93
+SHOW_INCLUDE_FILES     = YES
94
+SHOW_GROUPED_MEMB_INC  = NO
95
+FORCE_LOCAL_INCLUDES   = NO
96
+INLINE_INFO            = YES
97
+SORT_MEMBER_DOCS       = YES
98
+SORT_BRIEF_DOCS        = NO
99
+SORT_MEMBERS_CTORS_1ST = NO
100
+SORT_GROUP_NAMES       = NO
101
+SORT_BY_SCOPE_NAME     = NO
102
+STRICT_PROTO_MATCHING  = NO
103
+GENERATE_TODOLIST      = YES
104
+GENERATE_TESTLIST      = YES
105
+GENERATE_BUGLIST       = YES
106
+GENERATE_DEPRECATEDLIST= YES
107
+ENABLED_SECTIONS       = 
108
+MAX_INITIALIZER_LINES  = 30
109
+SHOW_USED_FILES        = YES
110
+SHOW_FILES             = YES
111
+SHOW_NAMESPACES        = YES
112
+FILE_VERSION_FILTER    = 
113
+LAYOUT_FILE            = 
114
+CITE_BIB_FILES         = 
115
+
116
+#---------------------------------------------------------------------------
117
+# Configuration options related to warning and progress messages
118
+#---------------------------------------------------------------------------
119
+
120
+QUIET                  = NO
121
+WARNINGS               = YES
122
+WARN_IF_UNDOCUMENTED   = YES
123
+WARN_IF_DOC_ERROR      = YES
124
+WARN_NO_PARAMDOC       = NO
125
+WARN_AS_ERROR          = NO
126
+WARN_FORMAT            = "$file:$line: $text"
127
+WARN_LOGFILE           = 
128
+
129
+#---------------------------------------------------------------------------
130
+# Configuration options related to the input files
131
+#---------------------------------------------------------------------------
132
+
133
+INPUT                  = tmk_core quantum drivers
134
+INPUT_ENCODING         = UTF-8
135
+FILE_PATTERNS          = *.c \
136
+                         *.cc \
137
+                         *.cxx \
138
+                         *.cpp \
139
+                         *.c++ \
140
+                         *.h \
141
+                         *.hh \
142
+                         *.hxx \
143
+                         *.hpp \
144
+                         *.h++
145
+RECURSIVE              = YES
146
+EXCLUDE                = 
147
+EXCLUDE_SYMLINKS       = NO
148
+EXCLUDE_PATTERNS       = 
149
+EXCLUDE_SYMBOLS        = 
150
+EXAMPLE_PATH           = 
151
+EXAMPLE_PATTERNS       = *
152
+EXAMPLE_RECURSIVE      = NO
153
+IMAGE_PATH             = 
154
+INPUT_FILTER           = 
155
+FILTER_PATTERNS        = 
156
+FILTER_SOURCE_FILES    = NO
157
+FILTER_SOURCE_PATTERNS = 
158
+USE_MDFILE_AS_MAINPAGE = 
159
+
160
+#---------------------------------------------------------------------------
161
+# Configuration options related to source browsing
162
+#---------------------------------------------------------------------------
163
+
164
+SOURCE_BROWSER         = YES
165
+INLINE_SOURCES         = NO
166
+STRIP_CODE_COMMENTS    = YES
167
+REFERENCED_BY_RELATION = NO
168
+REFERENCES_RELATION    = NO
169
+REFERENCES_LINK_SOURCE = YES
170
+SOURCE_TOOLTIPS        = YES
171
+USE_HTAGS              = NO
172
+VERBATIM_HEADERS       = YES
173
+
174
+#---------------------------------------------------------------------------
175
+# Configuration options related to the alphabetical class index
176
+#---------------------------------------------------------------------------
177
+
178
+ALPHABETICAL_INDEX     = YES
179
+COLS_IN_ALPHA_INDEX    = 5
180
+IGNORE_PREFIX          = 
181
+
182
+#---------------------------------------------------------------------------
183
+# Configuration options related to disabled outputs
184
+#---------------------------------------------------------------------------
185
+
186
+GENERATE_HTML          = NO
187
+GENERATE_LATEX         = NO
188
+GENERATE_RTF           = NO
189
+GENERATE_MAN           = NO
190
+GENERATE_DOCBOOK       = NO
191
+GENERATE_AUTOGEN_DEF   = NO
192
+GENERATE_PERLMOD       = NO
193
+
194
+#---------------------------------------------------------------------------
195
+# Configuration options related to the XML output
196
+#---------------------------------------------------------------------------
197
+
198
+GENERATE_XML           = YES
199
+XML_OUTPUT             = xml
200
+XML_PROGRAMLISTING     = YES
201
+
202
+#---------------------------------------------------------------------------
203
+# Configuration options related to the preprocessor
204
+#---------------------------------------------------------------------------
205
+
206
+ENABLE_PREPROCESSING   = YES
207
+MACRO_EXPANSION        = NO
208
+EXPAND_ONLY_PREDEF     = NO
209
+SEARCH_INCLUDES        = YES
210
+INCLUDE_PATH           = 
211
+INCLUDE_FILE_PATTERNS  = 
212
+PREDEFINED             = 
213
+EXPAND_AS_DEFINED      = 
214
+SKIP_FUNCTION_MACROS   = YES
215
+
216
+#---------------------------------------------------------------------------
217
+# Configuration options related to external references
218
+#---------------------------------------------------------------------------
219
+
220
+TAGFILES               = 
221
+GENERATE_TAGFILE       = 
222
+ALLEXTERNALS           = NO
223
+EXTERNAL_GROUPS        = YES
224
+EXTERNAL_PAGES         = YES
225
+PERL_PATH              = /usr/bin/perl
226
+
227
+#---------------------------------------------------------------------------
228
+# Configuration options related to the dot tool
229
+#---------------------------------------------------------------------------
230
+
231
+CLASS_DIAGRAMS         = YES
232
+MSCGEN_PATH            = 
233
+DIA_PATH               = 
234
+HIDE_UNDOC_RELATIONS   = YES
235
+HAVE_DOT               = NO
236
+DOT_NUM_THREADS        = 0
237
+DOT_FONTNAME           = Helvetica
238
+DOT_FONTSIZE           = 10
239
+DOT_FONTPATH           = 
240
+CLASS_GRAPH            = YES
241
+COLLABORATION_GRAPH    = YES
242
+GROUP_GRAPHS           = YES
243
+UML_LOOK               = NO
244
+UML_LIMIT_NUM_FIELDS   = 10
245
+TEMPLATE_RELATIONS     = NO
246
+INCLUDE_GRAPH          = YES
247
+INCLUDED_BY_GRAPH      = YES
248
+CALL_GRAPH             = NO
249
+CALLER_GRAPH           = NO
250
+GRAPHICAL_HIERARCHY    = YES
251
+DIRECTORY_GRAPH        = YES
252
+DOT_IMAGE_FORMAT       = png
253
+INTERACTIVE_SVG        = NO
254
+DOT_PATH               = 
255
+DOTFILE_DIRS           = 
256
+MSCFILE_DIRS           = 
257
+DIAFILE_DIRS           = 
258
+PLANTUML_JAR_PATH      = 
259
+PLANTUML_CFG_FILE      = 
260
+PLANTUML_INCLUDE_PATH  = 
261
+DOT_GRAPH_MAX_NODES    = 50
262
+MAX_DOT_GRAPH_DEPTH    = 0
263
+DOT_TRANSPARENT        = NO
264
+DOT_MULTI_TARGETS      = NO
265
+GENERATE_LEGEND        = YES
266
+DOT_CLEANUP            = YES

+ 9
- 0
docs/_summary.md View File

@@ -87,3 +87,12 @@
87 87
 
88 88
 * Other Topics
89 89
   * [Using Eclipse with QMK](eclipse.md)
90
+
91
+* QMK API (In Progress)
92
+  * [Defines](api_defines.md)
93
+  * [Input Callback Reg](api_input_callback_reg.md)
94
+  * [Midi Device](api_midi_device.md)
95
+  * [Midi Device Setup Process](api_midi_device_setup_process.md)
96
+  * [Midi Util](api_midi_util.md)
97
+  * [Send Functions](api_send_functions.md)
98
+  * [Sysex Tools](api_sysex_tools.md)

+ 78
- 0
docs/api_defines.md View File

@@ -0,0 +1,78 @@
1
+# group `defines` {#group__defines}
2
+
3
+## Summary
4
+
5
+ Members                        | Descriptions                                
6
+--------------------------------|---------------------------------------------
7
+`define `[`SYSEX_BEGIN`](#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79)            | 
8
+`define `[`SYSEX_END`](#group__defines_1ga753706d1d28e6f96d7caf1973e80feed)            | 
9
+`define `[`MIDI_STATUSMASK`](#group__defines_1gab78a1c818a5f5dab7a8946543f126c69)            | 
10
+`define `[`MIDI_CHANMASK`](#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909)            | 
11
+`define `[`MIDI_CC`](#group__defines_1ga45f116a1daab76b3c930c2cecfaef215)            | 
12
+`define `[`MIDI_NOTEON`](#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7)            | 
13
+`define `[`MIDI_NOTEOFF`](#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc)            | 
14
+`define `[`MIDI_AFTERTOUCH`](#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f)            | 
15
+`define `[`MIDI_PITCHBEND`](#group__defines_1gabcc799504e8064679bca03f232223af4)            | 
16
+`define `[`MIDI_PROGCHANGE`](#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42)            | 
17
+`define `[`MIDI_CHANPRESSURE`](#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe)            | 
18
+`define `[`MIDI_CLOCK`](#group__defines_1gafa5e4e295aafd15ab7893344599b3b89)            | 
19
+`define `[`MIDI_TICK`](#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7)            | 
20
+`define `[`MIDI_START`](#group__defines_1ga8233631c85823aa546f932ad8975caa4)            | 
21
+`define `[`MIDI_CONTINUE`](#group__defines_1gab24430f0081e27215b0da84dd0ee745c)            | 
22
+`define `[`MIDI_STOP`](#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62)            | 
23
+`define `[`MIDI_ACTIVESENSE`](#group__defines_1gacd88ed42dba52bb4b2052c5656362677)            | 
24
+`define `[`MIDI_RESET`](#group__defines_1ga02947f30ca62dc332fdeb10c5868323b)            | 
25
+`define `[`MIDI_TC_QUARTERFRAME`](#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31)            | 
26
+`define `[`MIDI_SONGPOSITION`](#group__defines_1ga412f6ed33a2150051374bee334ee1705)            | 
27
+`define `[`MIDI_SONGSELECT`](#group__defines_1gafcab254838b028365ae0259729e72c4e)            | 
28
+`define `[`MIDI_TUNEREQUEST`](#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795)            | 
29
+`define `[`SYSEX_EDUMANUFID`](#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f)            | 
30
+
31
+## Members
32
+
33
+#### `define `[`SYSEX_BEGIN`](#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79) {#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79}
34
+
35
+#### `define `[`SYSEX_END`](#group__defines_1ga753706d1d28e6f96d7caf1973e80feed) {#group__defines_1ga753706d1d28e6f96d7caf1973e80feed}
36
+
37
+#### `define `[`MIDI_STATUSMASK`](#group__defines_1gab78a1c818a5f5dab7a8946543f126c69) {#group__defines_1gab78a1c818a5f5dab7a8946543f126c69}
38
+
39
+#### `define `[`MIDI_CHANMASK`](#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909) {#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909}
40
+
41
+#### `define `[`MIDI_CC`](#group__defines_1ga45f116a1daab76b3c930c2cecfaef215) {#group__defines_1ga45f116a1daab76b3c930c2cecfaef215}
42
+
43
+#### `define `[`MIDI_NOTEON`](#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7) {#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7}
44
+
45
+#### `define `[`MIDI_NOTEOFF`](#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc) {#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc}
46
+
47
+#### `define `[`MIDI_AFTERTOUCH`](#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f) {#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f}
48
+
49
+#### `define `[`MIDI_PITCHBEND`](#group__defines_1gabcc799504e8064679bca03f232223af4) {#group__defines_1gabcc799504e8064679bca03f232223af4}
50
+
51
+#### `define `[`MIDI_PROGCHANGE`](#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42) {#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42}
52
+
53
+#### `define `[`MIDI_CHANPRESSURE`](#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe) {#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe}
54
+
55
+#### `define `[`MIDI_CLOCK`](#group__defines_1gafa5e4e295aafd15ab7893344599b3b89) {#group__defines_1gafa5e4e295aafd15ab7893344599b3b89}
56
+
57
+#### `define `[`MIDI_TICK`](#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7) {#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7}
58
+
59
+#### `define `[`MIDI_START`](#group__defines_1ga8233631c85823aa546f932ad8975caa4) {#group__defines_1ga8233631c85823aa546f932ad8975caa4}
60
+
61
+#### `define `[`MIDI_CONTINUE`](#group__defines_1gab24430f0081e27215b0da84dd0ee745c) {#group__defines_1gab24430f0081e27215b0da84dd0ee745c}
62
+
63
+#### `define `[`MIDI_STOP`](#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62) {#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62}
64
+
65
+#### `define `[`MIDI_ACTIVESENSE`](#group__defines_1gacd88ed42dba52bb4b2052c5656362677) {#group__defines_1gacd88ed42dba52bb4b2052c5656362677}
66
+
67
+#### `define `[`MIDI_RESET`](#group__defines_1ga02947f30ca62dc332fdeb10c5868323b) {#group__defines_1ga02947f30ca62dc332fdeb10c5868323b}
68
+
69
+#### `define `[`MIDI_TC_QUARTERFRAME`](#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31) {#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31}
70
+
71
+#### `define `[`MIDI_SONGPOSITION`](#group__defines_1ga412f6ed33a2150051374bee334ee1705) {#group__defines_1ga412f6ed33a2150051374bee334ee1705}
72
+
73
+#### `define `[`MIDI_SONGSELECT`](#group__defines_1gafcab254838b028365ae0259729e72c4e) {#group__defines_1gafcab254838b028365ae0259729e72c4e}
74
+
75
+#### `define `[`MIDI_TUNEREQUEST`](#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795) {#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795}
76
+
77
+#### `define `[`SYSEX_EDUMANUFID`](#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f) {#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f}
78
+

+ 169
- 0
docs/api_input_callback_reg.md View File

@@ -0,0 +1,169 @@
1
+# group `input_callback_reg` {#group__input__callback__reg}
2
+
3
+These are the functions you use to register your input callbacks.
4
+
5
+The functions are called when the appropriate midi message is matched on the associated device's input.
6
+
7
+## Summary
8
+
9
+ Members                        | Descriptions                                
10
+--------------------------------|---------------------------------------------
11
+`public void `[`midi_register_cc_callback`](#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)`            | Register a control change message (cc) callback.
12
+`public void `[`midi_register_noteon_callback`](#group__input__callback__reg_1ga3962f276c17618923f1152779552103e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)`            | Register a note on callback.
13
+`public void `[`midi_register_noteoff_callback`](#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)`            | Register a note off callback.
14
+`public void `[`midi_register_aftertouch_callback`](#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)`            | Register an after touch callback.
15
+`public void `[`midi_register_pitchbend_callback`](#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)`            | Register a pitch bend callback.
16
+`public void `[`midi_register_songposition_callback`](#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)`            | Register a song position callback.
17
+`public void `[`midi_register_progchange_callback`](#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)`            | Register a program change callback.
18
+`public void `[`midi_register_chanpressure_callback`](#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)`            | Register a channel pressure callback.
19
+`public void `[`midi_register_songselect_callback`](#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)`            | Register a song select callback.
20
+`public void `[`midi_register_tc_quarterframe_callback`](#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)`            | Register a tc quarter frame callback.
21
+`public void `[`midi_register_realtime_callback`](#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)`            | Register a realtime callback.
22
+`public void `[`midi_register_tunerequest_callback`](#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)`            | Register a tune request callback.
23
+`public void `[`midi_register_sysex_callback`](#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_sysex_func_t func)`            | Register a sysex callback.
24
+`public void `[`midi_register_fallthrough_callback`](#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)`            | Register fall through callback.
25
+`public void `[`midi_register_catchall_callback`](#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)`            | Register a catch all callback.
26
+
27
+## Members
28
+
29
+#### `public void `[`midi_register_cc_callback`](#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718}
30
+
31
+Register a control change message (cc) callback.
32
+
33
+#### Parameters
34
+* `device` the device associate with 
35
+
36
+* `func` the callback function to register
37
+
38
+#### `public void `[`midi_register_noteon_callback`](#group__input__callback__reg_1ga3962f276c17618923f1152779552103e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga3962f276c17618923f1152779552103e}
39
+
40
+Register a note on callback.
41
+
42
+#### Parameters
43
+* `device` the device associate with 
44
+
45
+* `func` the callback function to register
46
+
47
+#### `public void `[`midi_register_noteoff_callback`](#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d}
48
+
49
+Register a note off callback.
50
+
51
+#### Parameters
52
+* `device` the device associate with 
53
+
54
+* `func` the callback function to register
55
+
56
+#### `public void `[`midi_register_aftertouch_callback`](#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f}
57
+
58
+Register an after touch callback.
59
+
60
+#### Parameters
61
+* `device` the device associate with 
62
+
63
+* `func` the callback function to register
64
+
65
+#### `public void `[`midi_register_pitchbend_callback`](#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48}
66
+
67
+Register a pitch bend callback.
68
+
69
+#### Parameters
70
+* `device` the device associate with 
71
+
72
+* `func` the callback function to register
73
+
74
+#### `public void `[`midi_register_songposition_callback`](#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6}
75
+
76
+Register a song position callback.
77
+
78
+#### Parameters
79
+* `device` the device associate with 
80
+
81
+* `func` the callback function to register
82
+
83
+#### `public void `[`midi_register_progchange_callback`](#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127}
84
+
85
+Register a program change callback.
86
+
87
+#### Parameters
88
+* `device` the device associate with 
89
+
90
+* `func` the callback function to register
91
+
92
+#### `public void `[`midi_register_chanpressure_callback`](#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5}
93
+
94
+Register a channel pressure callback.
95
+
96
+#### Parameters
97
+* `device` the device associate with 
98
+
99
+* `func` the callback function to register
100
+
101
+#### `public void `[`midi_register_songselect_callback`](#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72}
102
+
103
+Register a song select callback.
104
+
105
+#### Parameters
106
+* `device` the device associate with 
107
+
108
+* `func` the callback function to register
109
+
110
+#### `public void `[`midi_register_tc_quarterframe_callback`](#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e}
111
+
112
+Register a tc quarter frame callback.
113
+
114
+#### Parameters
115
+* `device` the device associate with 
116
+
117
+* `func` the callback function to register
118
+
119
+#### `public void `[`midi_register_realtime_callback`](#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` {#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a}
120
+
121
+Register a realtime callback.
122
+
123
+The callback will be called for all of the real time message types.
124
+
125
+#### Parameters
126
+* `device` the device associate with 
127
+
128
+* `func` the callback function to register
129
+
130
+#### `public void `[`midi_register_tunerequest_callback`](#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` {#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1}
131
+
132
+Register a tune request callback.
133
+
134
+#### Parameters
135
+* `device` the device associate with 
136
+
137
+* `func` the callback function to register
138
+
139
+#### `public void `[`midi_register_sysex_callback`](#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_sysex_func_t func)` {#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48}
140
+
141
+Register a sysex callback.
142
+
143
+#### Parameters
144
+* `device` the device associate with 
145
+
146
+* `func` the callback function to register
147
+
148
+#### `public void `[`midi_register_fallthrough_callback`](#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` {#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94}
149
+
150
+Register fall through callback.
151
+
152
+This is only called if a more specific callback is not matched and called. For instance, if you don't register a note on callback but you get a note on message the fall through callback will be called, if it is registered.
153
+
154
+#### Parameters
155
+* `device` the device associate with 
156
+
157
+* `func` the callback function to register
158
+
159
+#### `public void `[`midi_register_catchall_callback`](#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` {#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99}
160
+
161
+Register a catch all callback.
162
+
163
+If registered, the catch all callback is called for every message that is matched, even if a more specific or the fallthrough callback is registered.
164
+
165
+#### Parameters
166
+* `device` the device associate with 
167
+
168
+* `func` the callback function to register
169
+

+ 143
- 0
docs/api_midi_device.md View File

@@ -0,0 +1,143 @@
1
+# group `midi_device` {#group__midi__device}
2
+
3
+You use the functions when you are implementing your own midi device.
4
+
5
+You set a send function to actually send bytes via your device, this method is called when you call a send function with this device, for instance midi_send_cc
6
+
7
+You use the midi_device_input to process input data from the device and pass it through the device's associated callbacks.
8
+
9
+You use the midi_device_set_pre_input_process_func if you want to have a function called at the beginning of the device's process function, generally to poll for input and pass that into midi_device_input
10
+
11
+## Summary
12
+
13
+ Members                        | Descriptions                                
14
+--------------------------------|---------------------------------------------
15
+`define `[`MIDI_INPUT_QUEUE_LENGTH`](#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8)            | 
16
+`enum `[`input_state_t`](#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621)            | 
17
+`public void `[`midi_device_input`](#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t cnt,uint8_t * input)`            | Process input bytes. This function parses bytes and calls the appropriate callbacks associated with the given device. You use this function if you are creating a custom device and you want to have midi input.
18
+`public void `[`midi_device_set_send_func`](#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t send_func)`            | Set the callback function that will be used for sending output data bytes. This is only used if you're creating a custom device. You'll most likely want the callback function to disable interrupts so that you can call the various midi send functions without worrying about locking.
19
+`public void `[`midi_device_set_pre_input_process_func`](#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_no_byte_func_t pre_process_func)`            | Set a callback which is called at the beginning of the midi_device_process call. This can be used to poll for input data and send the data through the midi_device_input function. You'll probably only use this if you're creating a custom device.
20
+`struct `[`_midi_device`](docs/api_midi_device.md#struct__midi__device) | This structure represents the input and output functions and processing data for a midi device.
21
+
22
+## Members
23
+
24
+#### `define `[`MIDI_INPUT_QUEUE_LENGTH`](#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8) {#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8}
25
+
26
+#### `enum `[`input_state_t`](#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621) {#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621}
27
+
28
+ Values                         | Descriptions                                
29
+--------------------------------|---------------------------------------------
30
+IDLE            | 
31
+ONE_BYTE_MESSAGE            | 
32
+TWO_BYTE_MESSAGE            | 
33
+THREE_BYTE_MESSAGE            | 
34
+SYSEX_MESSAGE            | 
35
+
36
+#### `public void `[`midi_device_input`](#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t cnt,uint8_t * input)` {#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db}
37
+
38
+Process input bytes. This function parses bytes and calls the appropriate callbacks associated with the given device. You use this function if you are creating a custom device and you want to have midi input.
39
+
40
+#### Parameters
41
+* `device` the midi device to associate the input with 
42
+
43
+* `cnt` the number of bytes you are processing 
44
+
45
+* `input` the bytes to process
46
+
47
+#### `public void `[`midi_device_set_send_func`](#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t send_func)` {#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673}
48
+
49
+Set the callback function that will be used for sending output data bytes. This is only used if you're creating a custom device. You'll most likely want the callback function to disable interrupts so that you can call the various midi send functions without worrying about locking.
50
+
51
+#### Parameters
52
+* `device` the midi device to associate this callback with 
53
+
54
+* `send_func` the callback function that will do the sending
55
+
56
+#### `public void `[`midi_device_set_pre_input_process_func`](#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_no_byte_func_t pre_process_func)` {#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69}
57
+
58
+Set a callback which is called at the beginning of the midi_device_process call. This can be used to poll for input data and send the data through the midi_device_input function. You'll probably only use this if you're creating a custom device.
59
+
60
+#### Parameters
61
+* `device` the midi device to associate this callback with 
62
+
63
+* `midi_no_byte_func_t` the actual callback function
64
+
65
+# struct `_midi_device` {#struct__midi__device}
66
+
67
+This structure represents the input and output functions and processing data for a midi device.
68
+
69
+A device can represent an actual physical device [serial port, usb port] or something virtual. You should not need to modify this structure directly.
70
+
71
+## Summary
72
+
73
+ Members                        | Descriptions                                
74
+--------------------------------|---------------------------------------------
75
+`public midi_var_byte_func_t `[`send_func`](docs/api_midi_device.md#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9) | 
76
+`public midi_three_byte_func_t `[`input_cc_callback`](docs/api_midi_device.md#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1) | 
77
+`public midi_three_byte_func_t `[`input_noteon_callback`](docs/api_midi_device.md#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c) | 
78
+`public midi_three_byte_func_t `[`input_noteoff_callback`](docs/api_midi_device.md#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84) | 
79
+`public midi_three_byte_func_t `[`input_aftertouch_callback`](docs/api_midi_device.md#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f) | 
80
+`public midi_three_byte_func_t `[`input_pitchbend_callback`](docs/api_midi_device.md#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18) | 
81
+`public midi_three_byte_func_t `[`input_songposition_callback`](docs/api_midi_device.md#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586) | 
82
+`public midi_two_byte_func_t `[`input_progchange_callback`](docs/api_midi_device.md#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da) | 
83
+`public midi_two_byte_func_t `[`input_chanpressure_callback`](docs/api_midi_device.md#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7) | 
84
+`public midi_two_byte_func_t `[`input_songselect_callback`](docs/api_midi_device.md#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f) | 
85
+`public midi_two_byte_func_t `[`input_tc_quarterframe_callback`](docs/api_midi_device.md#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0) | 
86
+`public midi_one_byte_func_t `[`input_realtime_callback`](docs/api_midi_device.md#struct__midi__device_1a9448eba4afb7e43650434748db3777be) | 
87
+`public midi_one_byte_func_t `[`input_tunerequest_callback`](docs/api_midi_device.md#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d) | 
88
+`public midi_sysex_func_t `[`input_sysex_callback`](docs/api_midi_device.md#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2) | 
89
+`public midi_var_byte_func_t `[`input_fallthrough_callback`](docs/api_midi_device.md#struct__midi__device_1abb974ec6d734001b4a0e370f292be503) | 
90
+`public midi_var_byte_func_t `[`input_catchall_callback`](docs/api_midi_device.md#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8) | 
91
+`public midi_no_byte_func_t `[`pre_input_process_callback`](docs/api_midi_device.md#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754) | 
92
+`public uint8_t `[`input_buffer`](docs/api_midi_device.md#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a) | 
93
+`public input_state_t `[`input_state`](docs/api_midi_device.md#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39) | 
94
+`public uint16_t `[`input_count`](docs/api_midi_device.md#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d) | 
95
+`public uint8_t `[`input_queue_data`](docs/api_midi_device.md#struct__midi__device_1ada41de021135dc423abedcbb30f366ff) | 
96
+`public `[`byteQueue_t`](#structbyte_queue__t)` `[`input_queue`](#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f) | 
97
+
98
+## Members
99
+
100
+#### `public midi_var_byte_func_t `[`send_func`](docs/api_midi_device.md#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9) {#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9}
101
+
102
+#### `public midi_three_byte_func_t `[`input_cc_callback`](docs/api_midi_device.md#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1) {#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1}
103
+
104
+#### `public midi_three_byte_func_t `[`input_noteon_callback`](docs/api_midi_device.md#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c) {#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c}
105
+
106
+#### `public midi_three_byte_func_t `[`input_noteoff_callback`](docs/api_midi_device.md#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84) {#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84}
107
+
108
+#### `public midi_three_byte_func_t `[`input_aftertouch_callback`](docs/api_midi_device.md#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f) {#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f}
109
+
110
+#### `public midi_three_byte_func_t `[`input_pitchbend_callback`](docs/api_midi_device.md#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18) {#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18}
111
+
112
+#### `public midi_three_byte_func_t `[`input_songposition_callback`](docs/api_midi_device.md#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586) {#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586}
113
+
114
+#### `public midi_two_byte_func_t `[`input_progchange_callback`](docs/api_midi_device.md#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da) {#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da}
115
+
116
+#### `public midi_two_byte_func_t `[`input_chanpressure_callback`](docs/api_midi_device.md#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7) {#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7}
117
+
118
+#### `public midi_two_byte_func_t `[`input_songselect_callback`](docs/api_midi_device.md#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f) {#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f}
119
+
120
+#### `public midi_two_byte_func_t `[`input_tc_quarterframe_callback`](docs/api_midi_device.md#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0) {#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0}
121
+
122
+#### `public midi_one_byte_func_t `[`input_realtime_callback`](docs/api_midi_device.md#struct__midi__device_1a9448eba4afb7e43650434748db3777be) {#struct__midi__device_1a9448eba4afb7e43650434748db3777be}
123
+
124
+#### `public midi_one_byte_func_t `[`input_tunerequest_callback`](docs/api_midi_device.md#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d) {#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d}
125
+
126
+#### `public midi_sysex_func_t `[`input_sysex_callback`](docs/api_midi_device.md#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2) {#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2}
127
+
128
+#### `public midi_var_byte_func_t `[`input_fallthrough_callback`](docs/api_midi_device.md#struct__midi__device_1abb974ec6d734001b4a0e370f292be503) {#struct__midi__device_1abb974ec6d734001b4a0e370f292be503}
129
+
130
+#### `public midi_var_byte_func_t `[`input_catchall_callback`](docs/api_midi_device.md#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8) {#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8}
131
+
132
+#### `public midi_no_byte_func_t `[`pre_input_process_callback`](docs/api_midi_device.md#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754) {#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754}
133
+
134
+#### `public uint8_t `[`input_buffer`](docs/api_midi_device.md#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a) {#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a}
135
+
136
+#### `public input_state_t `[`input_state`](docs/api_midi_device.md#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39) {#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39}
137
+
138
+#### `public uint16_t `[`input_count`](docs/api_midi_device.md#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d) {#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d}
139
+
140
+#### `public uint8_t `[`input_queue_data`](docs/api_midi_device.md#struct__midi__device_1ada41de021135dc423abedcbb30f366ff) {#struct__midi__device_1ada41de021135dc423abedcbb30f366ff}
141
+
142
+#### `public `[`byteQueue_t`](#structbyte_queue__t)` `[`input_queue`](#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f) {#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f}
143
+

+ 31
- 0
docs/api_midi_device_setup_process.md View File

@@ -0,0 +1,31 @@
1
+# group `midi_device_setup_process` {#group__midi__device__setup__process}
2
+
3
+These are method that you must use to initialize and run a device.
4
+
5
+## Summary
6
+
7
+ Members                        | Descriptions                                
8
+--------------------------------|---------------------------------------------
9
+`public void `[`midi_device_init`](#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9)`(`[`MidiDevice`](#struct__midi__device)` * device)`            | Initialize a device.
10
+`public void `[`midi_device_process`](#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b)`(`[`MidiDevice`](#struct__midi__device)` * device)`            | Process input data.
11
+
12
+## Members
13
+
14
+#### `public void `[`midi_device_init`](#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9}
15
+
16
+Initialize a device.
17
+
18
+You must call this before using the device in question.
19
+
20
+#### Parameters
21
+* `device` the device to initialize
22
+
23
+#### `public void `[`midi_device_process`](#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b}
24
+
25
+Process input data.
26
+
27
+This method drives the input processing, you must call this method frequently if you expect to have your input callbacks called.
28
+
29
+#### Parameters
30
+* `device` the device to process
31
+

+ 54
- 0
docs/api_midi_util.md View File

@@ -0,0 +1,54 @@
1
+# group `midi_util` {#group__midi__util}
2
+
3
+## Summary
4
+
5
+ Members                        | Descriptions                                
6
+--------------------------------|---------------------------------------------
7
+`enum `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e)            | An enumeration of the possible packet length values.
8
+`public bool `[`midi_is_statusbyte`](#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5)`(uint8_t theByte)`            | Test to see if the byte given is a status byte.
9
+`public bool `[`midi_is_realtime`](#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7)`(uint8_t theByte)`            | Test to see if the byte given is a realtime message.
10
+`public `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e)` `[`midi_packet_length`](#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175)`(uint8_t status)`            | Find the length of the packet associated with the status byte given.
11
+
12
+## Members
13
+
14
+#### `enum `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e) {#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e}
15
+
16
+ Values                         | Descriptions                                
17
+--------------------------------|---------------------------------------------
18
+UNDEFINED            | 
19
+ONE            | 
20
+TWO            | 
21
+THREE            | 
22
+
23
+An enumeration of the possible packet length values.
24
+
25
+#### `public bool `[`midi_is_statusbyte`](#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5)`(uint8_t theByte)` {#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5}
26
+
27
+Test to see if the byte given is a status byte.
28
+
29
+#### Parameters
30
+* `theByte` the byte to test 
31
+
32
+#### Returns
33
+true if the byte given is a midi status byte
34
+
35
+#### `public bool `[`midi_is_realtime`](#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7)`(uint8_t theByte)` {#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7}
36
+
37
+Test to see if the byte given is a realtime message.
38
+
39
+#### Parameters
40
+* `theByte` the byte to test 
41
+
42
+#### Returns
43
+true if it is a realtime message, false otherwise
44
+
45
+#### `public `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e)` `[`midi_packet_length`](#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175)`(uint8_t status)` {#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175}
46
+
47
+Find the length of the packet associated with the status byte given.
48
+
49
+#### Parameters
50
+* `status` the status byte 
51
+
52
+#### Returns
53
+the length of the packet, will return UNDEFINED if the byte is not a status byte or if it is a sysex status byte
54
+

+ 241
- 0
docs/api_send_functions.md View File

@@ -0,0 +1,241 @@
1
+# group `send_functions` {#group__send__functions}
2
+
3
+These are the functions you use to send midi data through a device.
4
+
5
+## Summary
6
+
7
+ Members                        | Descriptions                                
8
+--------------------------------|---------------------------------------------
9
+`public void `[`midi_send_cc`](#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t val)`            | Send a control change message (cc) via the given device.
10
+`public void `[`midi_send_noteon`](#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)`            | Send a note on message via the given device.
11
+`public void `[`midi_send_noteoff`](#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)`            | Send a note off message via the given device.
12
+`public void `[`midi_send_aftertouch`](#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t note_num,uint8_t amt)`            | Send an after touch message via the given device.
13
+`public void `[`midi_send_pitchbend`](#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,int16_t amt)`            | Send a pitch bend message via the given device.
14
+`public void `[`midi_send_programchange`](#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num)`            | Send a program change message via the given device.
15
+`public void `[`midi_send_channelpressure`](#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t amt)`            | Send a channel pressure message via the given device.
16
+`public void `[`midi_send_clock`](#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa)`(`[`MidiDevice`](#struct__midi__device)` * device)`            | Send a clock message via the given device.
17
+`public void `[`midi_send_tick`](#group__send__functions_1ga2b43c7d433d940c5b907595aac947972)`(`[`MidiDevice`](#struct__midi__device)` * device)`            | Send a tick message via the given device.
18
+`public void `[`midi_send_start`](#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc)`(`[`MidiDevice`](#struct__midi__device)` * device)`            | Send a start message via the given device.
19
+`public void `[`midi_send_continue`](#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120)`(`[`MidiDevice`](#struct__midi__device)` * device)`            | Send a continue message via the given device.
20
+`public void `[`midi_send_stop`](#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988)`(`[`MidiDevice`](#struct__midi__device)` * device)`            | Send a stop message via the given device.
21
+`public void `[`midi_send_activesense`](#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37)`(`[`MidiDevice`](#struct__midi__device)` * device)`            | Send an active sense message via the given device.
22
+`public void `[`midi_send_reset`](#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b)`(`[`MidiDevice`](#struct__midi__device)` * device)`            | Send a reset message via the given device.
23
+`public void `[`midi_send_tcquarterframe`](#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t time)`            | Send a tc quarter frame message via the given device.
24
+`public void `[`midi_send_songposition`](#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t pos)`            | Send a song position message via the given device.
25
+`public void `[`midi_send_songselect`](#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t song)`            | Send a song select message via the given device.
26
+`public void `[`midi_send_tunerequest`](#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656)`(`[`MidiDevice`](#struct__midi__device)` * device)`            | Send a tune request message via the given device.
27
+`public void `[`midi_send_byte`](#group__send__functions_1ga857e85eb90b288385642d4d991e09881)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t b)`            | Send a byte via the given device.
28
+`public void `[`midi_send_data`](#group__send__functions_1ga36e2f2e45369d911b76969361679054b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2)`            | Send up to 3 bytes of data.
29
+`public void `[`midi_send_array`](#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t * array)`            | Send an array of formatted midi data.
30
+
31
+## Members
32
+
33
+#### `public void `[`midi_send_cc`](#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t val)` {#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960}
34
+
35
+Send a control change message (cc) via the given device.
36
+
37
+#### Parameters
38
+* `device` the device to use for sending 
39
+
40
+* `chan` the channel to send on, 0-15 
41
+
42
+* `num` the cc num 
43
+
44
+* `val` the value of that cc num
45
+
46
+#### `public void `[`midi_send_noteon`](#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` {#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775}
47
+
48
+Send a note on message via the given device.
49
+
50
+#### Parameters
51
+* `device` the device to use for sending 
52
+
53
+* `chan` the channel to send on, 0-15 
54
+
55
+* `num` the note number 
56
+
57
+* `vel` the note velocity
58
+
59
+#### `public void `[`midi_send_noteoff`](#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` {#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49}
60
+
61
+Send a note off message via the given device.
62
+
63
+#### Parameters
64
+* `device` the device to use for sending 
65
+
66
+* `chan` the channel to send on, 0-15 
67
+
68
+* `num` the note number 
69
+
70
+* `vel` the note velocity
71
+
72
+#### `public void `[`midi_send_aftertouch`](#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t note_num,uint8_t amt)` {#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f}
73
+
74
+Send an after touch message via the given device.
75
+
76
+#### Parameters
77
+* `device` the device to use for sending 
78
+
79
+* `chan` the channel to send on, 0-15 
80
+
81
+* `note_num` the note number 
82
+
83
+* `amt` the after touch amount
84
+
85
+#### `public void `[`midi_send_pitchbend`](#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,int16_t amt)` {#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491}
86
+
87
+Send a pitch bend message via the given device.
88
+
89
+#### Parameters
90
+* `device` the device to use for sending 
91
+
92
+* `chan` the channel to send on, 0-15 
93
+
94
+* `amt` the bend amount range: -8192..8191, 0 means no bend
95
+
96
+#### `public void `[`midi_send_programchange`](#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num)` {#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86}
97
+
98
+Send a program change message via the given device.
99
+
100
+#### Parameters
101
+* `device` the device to use for sending 
102
+
103
+* `chan` the channel to send on, 0-15 
104
+
105
+* `num` the program to change to
106
+
107
+#### `public void `[`midi_send_channelpressure`](#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t amt)` {#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b}
108
+
109
+Send a channel pressure message via the given device.
110
+
111
+#### Parameters
112
+* `device` the device to use for sending 
113
+
114
+* `chan` the channel to send on, 0-15 
115
+
116
+* `amt` the amount of channel pressure
117
+
118
+#### `public void `[`midi_send_clock`](#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa}
119
+
120
+Send a clock message via the given device.
121
+
122
+#### Parameters
123
+* `device` the device to use for sending
124
+
125
+#### `public void `[`midi_send_tick`](#group__send__functions_1ga2b43c7d433d940c5b907595aac947972)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga2b43c7d433d940c5b907595aac947972}
126
+
127
+Send a tick message via the given device.
128
+
129
+#### Parameters
130
+* `device` the device to use for sending
131
+
132
+#### `public void `[`midi_send_start`](#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc}
133
+
134
+Send a start message via the given device.
135
+
136
+#### Parameters
137
+* `device` the device to use for sending
138
+
139
+#### `public void `[`midi_send_continue`](#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120}
140
+
141
+Send a continue message via the given device.
142
+
143
+#### Parameters
144
+* `device` the device to use for sending
145
+
146
+#### `public void `[`midi_send_stop`](#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988}
147
+
148
+Send a stop message via the given device.
149
+
150
+#### Parameters
151
+* `device` the device to use for sending
152
+
153
+#### `public void `[`midi_send_activesense`](#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37}
154
+
155
+Send an active sense message via the given device.
156
+
157
+#### Parameters
158
+* `device` the device to use for sending
159
+
160
+#### `public void `[`midi_send_reset`](#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b}
161
+
162
+Send a reset message via the given device.
163
+
164
+#### Parameters
165
+* `device` the device to use for sending
166
+
167
+#### `public void `[`midi_send_tcquarterframe`](#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t time)` {#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a}
168
+
169
+Send a tc quarter frame message via the given device.
170
+
171
+#### Parameters
172
+* `device` the device to use for sending 
173
+
174
+* `time` the time of this quarter frame, range 0..16383
175
+
176
+#### `public void `[`midi_send_songposition`](#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t pos)` {#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f}
177
+
178
+Send a song position message via the given device.
179
+
180
+#### Parameters
181
+* `device` the device to use for sending 
182
+
183
+* `pos` the song position
184
+
185
+#### `public void `[`midi_send_songselect`](#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t song)` {#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50}
186
+
187
+Send a song select message via the given device.
188
+
189
+#### Parameters
190
+* `device` the device to use for sending 
191
+
192
+* `song` the song to select
193
+
194
+#### `public void `[`midi_send_tunerequest`](#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656}
195
+
196
+Send a tune request message via the given device.
197
+
198
+#### Parameters
199
+* `device` the device to use for sending
200
+
201
+#### `public void `[`midi_send_byte`](#group__send__functions_1ga857e85eb90b288385642d4d991e09881)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t b)` {#group__send__functions_1ga857e85eb90b288385642d4d991e09881}
202
+
203
+Send a byte via the given device.
204
+
205
+This is a generic method for sending data via the given midi device. This would be useful for sending sysex data or messages that are not implemented in this API, if there are any. Please contact the author if you find some so we can add them.
206
+
207
+#### Parameters
208
+* `device` the device to use for sending 
209
+
210
+* `b` the byte to send
211
+
212
+#### `public void `[`midi_send_data`](#group__send__functions_1ga36e2f2e45369d911b76969361679054b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2)` {#group__send__functions_1ga36e2f2e45369d911b76969361679054b}
213
+
214
+Send up to 3 bytes of data.
215
+
216
+% 4 is applied to count so that you can use this to pass sysex through
217
+
218
+#### Parameters
219
+* `device` the device to use for sending 
220
+
221
+* `count` the count of bytes to send, %4 is applied 
222
+
223
+* `byte0` the first byte 
224
+
225
+* `byte1` the second byte, ignored if cnt % 4 != 2 
226
+
227
+* `byte2` the third byte, ignored if cnt % 4 != 3
228
+
229
+#### `public void `[`midi_send_array`](#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t * array)` {#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead}
230
+
231
+Send an array of formatted midi data.
232
+
233
+Can be used for sysex.
234
+
235
+#### Parameters
236
+* `device` the device to use for sending 
237
+
238
+* `count` the count of bytes to send 
239
+
240
+* `array` the array of bytes
241
+

+ 61
- 0
docs/api_sysex_tools.md View File

@@ -0,0 +1,61 @@
1
+# group `sysex_tools` {#group__sysex__tools}
2
+
3
+## Summary
4
+
5
+ Members                        | Descriptions                                
6
+--------------------------------|---------------------------------------------
7
+`public uint16_t `[`sysex_encoded_length`](#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a)`(uint16_t decoded_length)`            | Compute the length of a message after it is encoded.
8
+`public uint16_t `[`sysex_decoded_length`](#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0)`(uint16_t encoded_length)`            | Compute the length of a message after it is decoded.
9
+`public uint16_t `[`sysex_encode`](#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742)`(uint8_t * encoded,const uint8_t * source,uint16_t length)`            | Encode data so that it can be transmitted safely in a sysex message.
10
+`public uint16_t `[`sysex_decode`](#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229)`(uint8_t * decoded,const uint8_t * source,uint16_t length)`            | Decode encoded data.
11
+
12
+## Members
13
+
14
+#### `public uint16_t `[`sysex_encoded_length`](#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a)`(uint16_t decoded_length)` {#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a}
15
+
16
+Compute the length of a message after it is encoded.
17
+
18
+#### Parameters
19
+* `decoded_length` The length, in bytes, of the message to encode.
20
+
21
+#### Returns
22
+The length, in bytes, of the message after encodeing.
23
+
24
+#### `public uint16_t `[`sysex_decoded_length`](#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0)`(uint16_t encoded_length)` {#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0}
25
+
26
+Compute the length of a message after it is decoded.
27
+
28
+#### Parameters
29
+* `encoded_length` The length, in bytes, of the encoded message.
30
+
31
+#### Returns
32
+The length, in bytes, of the message after it is decoded.
33
+
34
+#### `public uint16_t `[`sysex_encode`](#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742)`(uint8_t * encoded,const uint8_t * source,uint16_t length)` {#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742}
35
+
36
+Encode data so that it can be transmitted safely in a sysex message.
37
+
38
+#### Parameters
39
+* `encoded` The output data buffer, must be at least sysex_encoded_length(length) bytes long. 
40
+
41
+* `source` The input buffer of data to be encoded. 
42
+
43
+* `length` The number of bytes from the input buffer to encode.
44
+
45
+#### Returns
46
+number of bytes encoded.
47
+
48
+#### `public uint16_t `[`sysex_decode`](#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229)`(uint8_t * decoded,const uint8_t * source,uint16_t length)` {#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229}
49
+
50
+Decode encoded data.
51
+
52
+#### Parameters
53
+* `decoded` The output data buffer, must be at least sysex_decoded_length(length) bytes long. 
54
+
55
+* `source` The input buffer of data to be decoded. 
56
+
57
+* `length` The number of bytes from the input buffer to decode.
58
+
59
+#### Returns
60
+number of bytes decoded.
61
+

+ 32
- 0
doxygen-todo View File

@@ -0,0 +1,32 @@
1
+tmk_core/protocol
2
+tmk_core/protocol/bluefruit
3
+tmk_core/protocol/chibios
4
+tmk_core/protocol/iwrap
5
+tmk_core/protocol/lufa
6
+tmk_core/protocol/mbed
7
+tmk_core/protocol/midi
8
+tmk_core/protocol/midi/bytequeue
9
+tmk_core/protocol/midi/Config
10
+tmk_core/protocol/pjrc
11
+tmk_core/protocol/usb_hid
12
+tmk_core/protocol/vusb
13
+tmk_core/tool
14
+tmk_core/tool/chibios
15
+quantum
16
+quantum/api
17
+quantum/audio
18
+quantum/keymap_extras
19
+quantum/process_keycode
20
+quantum/serial_link
21
+quantum/serial_link/protocol
22
+quantum/serial_link/system
23
+quantum/serial_link/tests
24
+quantum/tools
25
+quantum/visualizer
26
+quantum/visualizer/resources
27
+drivers
28
+drivers/avr
29
+drivers/ugfx
30
+drivers/ugfx/gdisp
31
+drivers/ugfx/gdisp/is31fl3731c
32
+drivers/ugfx/gdisp/st7565

+ 58
- 5
tmk_core/common/action.c View File

@@ -44,6 +44,10 @@ int retro_tapping_counter = 0;
44 44
 #include <fauxclicky.h>
45 45
 #endif
46 46
 
47
+/** \brief Called to execute an action.
48
+ *
49
+ * FIXME: Needs documentation.
50
+ */
47 51
 void action_exec(keyevent_t event)
48 52
 {
49 53
     if (!IS_NOEVENT(event)) {
@@ -95,6 +99,10 @@ void action_exec(keyevent_t event)
95 99
 bool swap_hands = false;
96 100
 bool swap_held = false;
97 101
 
102
+/** \brief Process Hand Swap
103
+ *
104
+ * FIXME: Needs documentation.
105
+ */
98 106
 void process_hand_swap(keyevent_t *event) {
99 107
     static swap_state_row_t swap_state[MATRIX_ROWS];
100 108
 
@@ -134,7 +142,10 @@ bool process_record_quantum(keyrecord_t *record) {
134 142
 }
135 143
 
136 144
 #ifndef NO_ACTION_TAPPING
137
-// Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress.
145
+/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress.
146
+ *
147
+ * FIXME: Needs documentation.
148
+ */
138 149
 void process_record_tap_hint(keyrecord_t *record)
139 150
 {
140 151
     action_t action = layer_switch_get_action(record->event.key);
@@ -154,6 +165,10 @@ void process_record_tap_hint(keyrecord_t *record)
154 165
 }
155 166
 #endif
156 167
 
168
+/** \brief Take a key event (key press or key release) and processes it.
169
+ *
170
+ * FIXME: Needs documentation.
171
+ */
157 172
 void process_record(keyrecord_t *record)
158 173
 {
159 174
     if (IS_NOEVENT(record->event)) { return; }
@@ -172,6 +187,10 @@ void process_record(keyrecord_t *record)
172 187
     process_action(record, action);
173 188
 }
174 189
 
190
+/** \brief Take an action and processes it.
191
+ *
192
+ * FIXME: Needs documentation.
193
+ */
175 194
 void process_action(keyrecord_t *record, action_t action)
176 195
 {
177 196
     keyevent_t event = record->event;
@@ -674,8 +693,9 @@ void process_action(keyrecord_t *record, action_t action)
674 693
 
675 694
 
676 695
 
677
-/*
678
- * Utilities for actions.
696
+/** \brief Utilities for actions. (FIXME: Needs better description)
697
+ *
698
+ * FIXME: Needs documentation.
679 699
  */
680 700
 void register_code(uint8_t code)
681 701
 {
@@ -755,6 +775,10 @@ void register_code(uint8_t code)
755 775
     }
756 776
 }
757 777
 
778
+/** \brief Utilities for actions. (FIXME: Needs better description)
779
+ *
780
+ * FIXME: Needs documentation.
781
+ */
758 782
 void unregister_code(uint8_t code)
759 783
 {
760 784
     if (code == KC_NO) {
@@ -810,6 +834,10 @@ void unregister_code(uint8_t code)
810 834
     }
811 835
 }
812 836
 
837
+/** \brief Utilities for actions. (FIXME: Needs better description)
838
+ *
839
+ * FIXME: Needs documentation.
840
+ */
813 841
 void register_mods(uint8_t mods)
814 842
 {
815 843
     if (mods) {
@@ -818,6 +846,10 @@ void register_mods(uint8_t mods)
818 846
     }
819 847
 }
820 848
 
849
+/** \brief Utilities for actions. (FIXME: Needs better description)
850
+ *
851
+ * FIXME: Needs documentation.
852
+ */
821 853
 void unregister_mods(uint8_t mods)
822 854
 {
823 855
     if (mods) {
@@ -826,12 +858,20 @@ void unregister_mods(uint8_t mods)
826 858
     }
827 859
 }
828 860
 
861
+/** \brief Utilities for actions. (FIXME: Needs better description)
862
+ *
863
+ * FIXME: Needs documentation.
864
+ */
829 865
 void clear_keyboard(void)
830 866
 {
831 867
     clear_mods();
832 868
     clear_keyboard_but_mods();
833 869
 }
834 870
 
871
+/** \brief Utilities for actions. (FIXME: Needs better description)
872
+ *
873
+ * FIXME: Needs documentation.
874
+ */
835 875
 void clear_keyboard_but_mods(void)
836 876
 {
837 877
     clear_weak_mods();
@@ -848,6 +888,10 @@ void clear_keyboard_but_mods(void)
848 888
 #endif
849 889
 }
850 890
 
891
+/** \brief Utilities for actions. (FIXME: Needs better description)
892
+ *
893
+ * FIXME: Needs documentation.
894
+ */
851 895
 bool is_tap_key(keypos_t key)
852 896
 {
853 897
     action_t action = layer_switch_get_action(key);
@@ -880,14 +924,19 @@ bool is_tap_key(keypos_t key)
880 924
 }
881 925
 
882 926
 
883
-/*
884
- * debug print
927
+/** \brief Debug print (FIXME: Needs better description)
928
+ *
929
+ * FIXME: Needs documentation.
885 930
  */
886 931
 void debug_event(keyevent_t event)
887 932
 {
888 933
     dprintf("%04X%c(%u)", (event.key.row<<8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time);
889 934
 }
890 935
 
936
+/** \brief Debug print (FIXME: Needs better description)
937
+ *
938
+ * FIXME: Needs documentation.
939
+ */
891 940
 void debug_record(keyrecord_t record)
892 941
 {
893 942
     debug_event(record.event);
@@ -896,6 +945,10 @@ void debug_record(keyrecord_t record)
896 945
 #endif
897 946
 }
898 947
 
948
+/** \brief Debug print (FIXME: Needs better description)
949
+ *
950
+ * FIXME: Needs documentation.
951
+ */
899 952
 void debug_action(action_t action)
900 953
 {
901 954
     switch (action.kind.id) {

+ 15
- 19
tmk_core/common/action_code.h View File

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

+ 96
- 5
tmk_core/common/action_layer.c View File

@@ -11,16 +11,23 @@
11 11
 #endif
12 12
 
13 13
 
14
-/*
15
- * Default Layer State
14
+/** \brief Default Layer State
16 15
  */
17 16
 uint32_t default_layer_state = 0;
18 17
 
18
+/** \brief Default Layer State Set At Keyboard Level
19
+ *
20
+ * FIXME: Needs docs
21
+ */
19 22
 __attribute__((weak))
20 23
 uint32_t default_layer_state_set_kb(uint32_t state) {
21 24
     return state;
22 25
 }
23 26
 
27
+/** \brief Default Layer State Set
28
+ *
29
+ * FIXME: Needs docs
30
+ */
24 31
 static void default_layer_state_set(uint32_t state)
25 32
 {
26 33
     state = default_layer_state_set_kb(state);
@@ -31,25 +38,45 @@ static void default_layer_state_set(uint32_t state)
31 38
     clear_keyboard_but_mods(); // To avoid stuck keys
32 39
 }
33 40
 
41
+/** \brief Default Layer Print
42
+ *
43
+ * FIXME: Needs docs
44
+ */
34 45
 void default_layer_debug(void)
35 46
 {
36 47
     dprintf("%08lX(%u)", default_layer_state, biton32(default_layer_state));
37 48
 }
38 49
 
50
+/** \brief Default Layer Set
51
+ *
52
+ * FIXME: Needs docs
53
+ */
39 54
 void default_layer_set(uint32_t state)
40 55
 {
41 56
     default_layer_state_set(state);
42 57
 }
43 58
 
44 59
 #ifndef NO_ACTION_LAYER
60
+/** \brief Default Layer Or
61
+ *
62
+ * FIXME: Needs docs
63
+ */
45 64
 void default_layer_or(uint32_t state)
46 65
 {
47 66
     default_layer_state_set(default_layer_state | state);
48 67
 }
68
+/** \brief Default Layer And
69
+ *
70
+ * FIXME: Needs docs
71
+ */
49 72
 void default_layer_and(uint32_t state)
50 73
 {
51 74
     default_layer_state_set(default_layer_state & state);
52 75
 }
76
+/** \brief Default Layer Xor
77
+ *
78
+ * FIXME: Needs docs
79
+ */
53 80
 void default_layer_xor(uint32_t state)
54 81
 {
55 82
     default_layer_state_set(default_layer_state ^ state);
@@ -58,21 +85,32 @@ void default_layer_xor(uint32_t state)
58 85
 
59 86
 
60 87
 #ifndef NO_ACTION_LAYER
61
-/*
62
- * Keymap Layer State
88
+/** \brief Keymap Layer State
63 89
  */
64 90
 uint32_t layer_state = 0;
65 91
 
92
+/** \brief Layer state set user
93
+ *
94
+ * FIXME: Needs docs
95
+ */
66 96
 __attribute__((weak))
67 97
 uint32_t layer_state_set_user(uint32_t state) {
68 98
     return state;
69 99
 }
70 100
 
101
+/** \brief Layer state set keyboard
102
+ *
103
+ * FIXME: Needs docs
104
+ */
71 105
 __attribute__((weak))
72 106
 uint32_t layer_state_set_kb(uint32_t state) {
73 107
     return layer_state_set_user(state);
74 108
 }
75 109
 
110
+/** \brief Layer state set
111
+ *
112
+ * FIXME: Needs docs
113
+ */
76 114
 void layer_state_set(uint32_t state)
77 115
 {
78 116
     state = layer_state_set_kb(state);
@@ -83,54 +121,98 @@ void layer_state_set(uint32_t state)
83 121
     clear_keyboard_but_mods(); // To avoid stuck keys
84 122
 }
85 123
 
124
+/** \brief Layer clear
125
+ *
126
+ * FIXME: Needs docs
127
+ */
86 128
 void layer_clear(void)
87 129
 {
88 130
     layer_state_set(0);
89 131
 }
90 132
 
133
+/** \brief Layer state is
134
+ *
135
+ * FIXME: Needs docs
136
+ */
91 137
 bool layer_state_is(uint8_t layer)
92 138
 {
93 139
     return layer_state_cmp(layer_state, layer);
94 140
 }
95 141
 
142
+/** \brief Layer state compare
143
+ *
144
+ * FIXME: Needs docs
145
+ */
96 146
 bool layer_state_cmp(uint32_t cmp_layer_state, uint8_t layer) {
97 147
     if (!cmp_layer_state) { return layer == 0; }
98 148
     return (cmp_layer_state & (1UL<<layer)) != 0;
99 149
 }
100 150
 
151
+/** \brief Layer move
152
+ *
153
+ * FIXME: Needs docs
154
+ */
101 155
 void layer_move(uint8_t layer)
102 156
 {
103 157
     layer_state_set(1UL<<layer);
104 158
 }
105 159
 
160
+/** \brief Layer on
161
+ *
162
+ * FIXME: Needs docs
163
+ */
106 164
 void layer_on(uint8_t layer)
107 165
 {
108 166
     layer_state_set(layer_state | (1UL<<layer));
109 167
 }
110 168
 
169
+/** \brief Layer off
170
+ *
171
+ * FIXME: Needs docs
172
+ */
111 173
 void layer_off(uint8_t layer)
112 174
 {
113 175
     layer_state_set(layer_state & ~(1UL<<layer));
114 176
 }
115 177
 
178
+/** \brief Layer invert
179
+ *
180
+ * FIXME: Needs docs
181
+ */
116 182
 void layer_invert(uint8_t layer)
117 183
 {
118 184
     layer_state_set(layer_state ^ (1UL<<layer));
119 185
 }
120 186
 
187
+/** \brief Layer or
188
+ *
189
+ * FIXME: Needs docs
190
+ */
121 191
 void layer_or(uint32_t state)
122 192
 {
123 193
     layer_state_set(layer_state | state);
124 194
 }
195
+/** \brief Layer and
196
+ *
197
+ * FIXME: Needs docs
198
+ */
125 199
 void layer_and(uint32_t state)
126 200
 {
127 201
     layer_state_set(layer_state & state);
128 202
 }
203
+/** \brief Layer xor
204
+ *
205
+ * FIXME: Needs docs
206
+ */
129 207
 void layer_xor(uint32_t state)
130 208
 {
131 209
     layer_state_set(layer_state ^ state);
132 210
 }
133 211
 
212
+/** \brief Layer debug printing
213
+ *
214
+ * FIXME: Needs docs
215
+ */
134 216
 void layer_debug(void)
135 217
 {
136 218
     dprintf("%08lX(%u)", layer_state, biton32(layer_state));
@@ -172,7 +254,8 @@ uint8_t read_source_layers_cache(keypos_t key)
172 254
 }
173 255
 #endif
174 256
 
175
-/*
257
+/** \brief Store or get action (FIXME: Needs better summary)
258
+ *
176 259
  * Make sure the action triggered when the key is released is the same
177 260
  * one as the one triggered on press. It's important for the mod keys
178 261
  * when the layer is switched after the down event but before the up
@@ -201,6 +284,10 @@ action_t store_or_get_action(bool pressed, keypos_t key)
201 284
 }
202 285
 
203 286
 
287
+/** \brief Layer switch get layer
288
+ *
289
+ * FIXME: Needs docs
290
+ */
204 291
 int8_t layer_switch_get_layer(keypos_t key)
205 292
 {
206 293
 #ifndef NO_ACTION_LAYER
@@ -224,6 +311,10 @@ int8_t layer_switch_get_layer(keypos_t key)
224 311
 #endif
225 312
 }
226 313
 
314
+/** \brief Layer switch get layer
315
+ *
316
+ * FIXME: Needs docs
317
+ */
227 318
 action_t layer_switch_get_action(keypos_t key)
228 319
 {
229 320
     return action_for_key(layer_switch_get_layer(key), key);

+ 4
- 0
tmk_core/common/action_macro.c View File

@@ -29,6 +29,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
29 29
 #ifndef NO_ACTION_MACRO
30 30
 
31 31
 #define MACRO_READ()  (macro = MACRO_GET(macro_p++))
32
+/** \brief Action Macro Play
33
+ *
34
+ * FIXME: Needs doc
35
+ */
32 36
 void action_macro_play(const macro_t *macro_p)
33 37
 {
34 38
     macro_t macro = END;

+ 31
- 6
tmk_core/common/action_tapping.c View File

@@ -36,6 +36,10 @@ static void debug_tapping_key(void);
36 36
 static void debug_waiting_buffer(void);
37 37
 
38 38
 
39
+/** \brief Action Tapping Process
40
+ *
41
+ * FIXME: Needs doc
42
+ */
39 43
 void action_tapping_process(keyrecord_t record)
40 44
 {
41 45
     if (process_tapping(&record)) {
@@ -70,7 +74,7 @@ void action_tapping_process(keyrecord_t record)
70 74
 }
71 75
 
72 76
 
73
-/* Tapping
77
+/** \brief Tapping
74 78
  *
75 79
  * Rule: Tap key is typed(pressed and released) within TAPPING_TERM.
76 80
  *       (without interfering by typing other key)
@@ -289,8 +293,9 @@ bool process_tapping(keyrecord_t *keyp)
289 293
 }
290 294
 
291 295
 
292
-/*
293
- * Waiting buffer
296
+/** \brief Waiting buffer enq
297
+ *
298
+ * FIXME: Needs docs
294 299
  */
295 300
 bool waiting_buffer_enq(keyrecord_t record)
296 301
 {
@@ -310,12 +315,20 @@ bool waiting_buffer_enq(keyrecord_t record)
310 315
     return true;
311 316
 }
312 317
 
318
+/** \brief Waiting buffer clear
319
+ *
320
+ * FIXME: Needs docs
321
+ */
313 322
 void waiting_buffer_clear(void)
314 323
 {
315 324
     waiting_buffer_head = 0;
316 325
     waiting_buffer_tail = 0;
317 326
 }
318 327
 
328
+/** \brief Waiting buffer typed
329
+ *
330
+ * FIXME: Needs docs
331
+ */
319 332
 bool waiting_buffer_typed(keyevent_t event)
320 333
 {
321 334
     for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) {
@@ -326,6 +339,10 @@ bool waiting_buffer_typed(keyevent_t event)
326 339
     return false;
327 340
 }
328 341
 
342
+/** \brief Waiting buffer has anykey pressed
343
+ *
344
+ * FIXME: Needs docs
345
+ */
329 346
 __attribute__((unused))
330 347
 bool waiting_buffer_has_anykey_pressed(void)
331 348
 {
@@ -335,7 +352,10 @@ bool waiting_buffer_has_anykey_pressed(void)
335 352
     return false;
336 353
 }
337 354
 
338
-/* scan buffer for tapping */
355
+/** \brief Scan buffer for tapping
356
+ *
357
+ * FIXME: Needs docs
358
+ */
339 359
 void waiting_buffer_scan_tap(void)
340 360
 {
341 361
     // tapping already is settled
@@ -359,14 +379,19 @@ void waiting_buffer_scan_tap(void)
359 379
 }
360 380
 
361 381
 
362
-/*
363
- * debug print
382
+/** \brief Tapping key debug print
383
+ *
384
+ * FIXME: Needs docs
364 385
  */
365 386
 static void debug_tapping_key(void)
366 387
 {
367 388
     debug("TAPPING_KEY="); debug_record(tapping_key); debug("\n");
368 389
 }
369 390
 
391
+/** \brief Waiting buffer debug print
392
+ *
393
+ * FIXME: Needs docs
394
+ */
370 395
 static void debug_waiting_buffer(void)
371 396
 {
372 397
     debug("{ ");

+ 101
- 12
tmk_core/common/action_util.c View File

@@ -67,12 +67,12 @@ bool has_oneshot_mods_timed_out(void) {
67 67
 
68 68
 /* oneshot layer */
69 69
 #ifndef NO_ACTION_ONESHOT
70
-/* oneshot_layer_data bits
71
-* LLLL LSSS
72
-* where:
73
-*   L => are layer bits
74
-*   S => oneshot state bits
75
-*/
70
+/** \brief oneshot_layer_data bits
71
+ * LLLL LSSS
72
+ * where:
73
+ *   L => are layer bits
74
+ *   S => oneshot state bits
75
+ */
76 76
 static int8_t oneshot_layer_data = 0;
77 77
 
78 78
 inline uint8_t get_oneshot_layer(void) { return oneshot_layer_data >> 3; }
@@ -86,7 +86,10 @@ inline bool has_oneshot_layer_timed_out() {
86 86
 }
87 87
 #endif
88 88
 
89
-/* Oneshot layer */
89
+/** \brief Set oneshot layer 
90
+ *
91
+ * FIXME: needs doc
92
+ */
90 93
 void set_oneshot_layer(uint8_t layer, uint8_t state)
91 94
 {
92 95
     oneshot_layer_data = layer << 3 | state;
@@ -95,12 +98,20 @@ void set_oneshot_layer(uint8_t layer, uint8_t state)
95 98
     oneshot_layer_time = timer_read();
96 99
 #endif
97 100
 }
101
+/** \brief Reset oneshot layer 
102
+ *
103
+ * FIXME: needs doc
104
+ */
98 105
 void reset_oneshot_layer(void) {
99 106
     oneshot_layer_data = 0;
100 107
 #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
101 108
     oneshot_layer_time = 0;
102 109
 #endif
103 110
 }
111
+/** \brief Clear oneshot layer 
112
+ *
113
+ * FIXME: needs doc
114
+ */
104 115
 void clear_oneshot_layer_state(oneshot_fullfillment_t state)
105 116
 {
106 117
     uint8_t start_state = oneshot_layer_data;
@@ -112,12 +123,20 @@ void clear_oneshot_layer_state(oneshot_fullfillment_t state)
112 123
 #endif
113 124
     }
114 125
 }
126
+/** \brief Is oneshot layer active
127
+ *
128
+ * FIXME: needs doc
129
+ */
115 130
 bool is_oneshot_layer_active(void)
116 131
 {
117 132
     return get_oneshot_layer_state();
118 133
 }
119 134
 #endif
120 135
 
136
+/** \brief Send keyboard report
137
+ *
138
+ * FIXME: needs doc
139
+ */
121 140
 void send_keyboard_report(void) {
122 141
     keyboard_report->mods  = real_mods;
123 142
     keyboard_report->mods |= weak_mods;
@@ -140,29 +159,90 @@ void send_keyboard_report(void) {
140 159
     host_keyboard_send(keyboard_report);
141 160
 }
142 161
 
143
-/* modifier */
162
+/** \brief Get mods
163
+ *
164
+ * FIXME: needs doc
165
+ */
144 166
 uint8_t get_mods(void) { return real_mods; }
167
+/** \brief add mods
168
+ *
169
+ * FIXME: needs doc
170
+ */
145 171
 void add_mods(uint8_t mods) { real_mods |= mods; }
172
+/** \brief del mods
173
+ *
174
+ * FIXME: needs doc
175
+ */
146 176
 void del_mods(uint8_t mods) { real_mods &= ~mods; }
177
+/** \brief set mods
178
+ *
179
+ * FIXME: needs doc
180
+ */
147 181
 void set_mods(uint8_t mods) { real_mods = mods; }
182
+/** \brief clear mods
183
+ *
184
+ * FIXME: needs doc
185
+ */
148 186
 void clear_mods(void) { real_mods = 0; }
149 187
 
150
-/* weak modifier */
188
+/** \brief get weak mods
189
+ *
190
+ * FIXME: needs doc
191
+ */
151 192
 uint8_t get_weak_mods(void) { return weak_mods; }
193
+/** \brief add weak mods
194
+ *
195
+ * FIXME: needs doc
196
+ */
152 197
 void add_weak_mods(uint8_t mods) { weak_mods |= mods; }
198
+/** \brief del weak mods
199
+ *
200
+ * FIXME: needs doc
201
+ */
153 202
 void del_weak_mods(uint8_t mods) { weak_mods &= ~mods; }
203
+/** \brief set weak mods
204
+ *
205
+ * FIXME: needs doc
206
+ */
154 207
 void set_weak_mods(uint8_t mods) { weak_mods = mods; }
208
+/** \brief clear weak mods
209
+ *
210
+ * FIXME: needs doc
211
+ */
155 212
 void clear_weak_mods(void) { weak_mods = 0; }
156 213
 
157 214
 /* macro modifier */
215
+/** \brief get macro mods
216
+ *
217
+ * FIXME: needs doc
218
+ */
158 219
 uint8_t get_macro_mods(void) { return macro_mods; }
220
+/** \brief add macro mods
221
+ *
222
+ * FIXME: needs doc
223
+ */
159 224
 void add_macro_mods(uint8_t mods) { macro_mods |= mods; }
225
+/** \brief del macro mods
226
+ *
227
+ * FIXME: needs doc
228
+ */
160 229
 void del_macro_mods(uint8_t mods) { macro_mods &= ~mods; }
230
+/** \brief set macro mods
231
+ *
232
+ * FIXME: needs doc
233
+ */
161 234
 void set_macro_mods(uint8_t mods) { macro_mods = mods; }
235
+/** \brief clear macro mods
236
+ *
237
+ * FIXME: needs doc
238
+ */
162 239
 void clear_macro_mods(void) { macro_mods = 0; }
163 240
 
164
-/* Oneshot modifier */
165 241
 #ifndef NO_ACTION_ONESHOT
242
+/** \brief set oneshot mods
243
+ *
244
+ * FIXME: needs doc
245
+ */
166 246
 void set_oneshot_mods(uint8_t mods)
167 247
 {
168 248
     oneshot_mods = mods;
@@ -170,6 +250,10 @@ void set_oneshot_mods(uint8_t mods)
170 250
     oneshot_time = timer_read();
171 251
 #endif
172 252
 }
253
+/** \brief clear oneshot mods
254
+ *
255
+ * FIXME: needs doc
256
+ */
173 257
 void clear_oneshot_mods(void)
174 258
 {
175 259
     oneshot_mods = 0;
@@ -177,14 +261,19 @@ void clear_oneshot_mods(void)
177 261
     oneshot_time = 0;
178 262
 #endif
179 263
 }
264
+/** \brief get oneshot mods
265
+ *
266
+ * FIXME: needs doc
267
+ */
180 268
 uint8_t get_oneshot_mods(void)
181 269
 {
182 270
     return oneshot_mods;
183 271
 }
184 272
 #endif
185 273
 
186
-/*
187
- * inspect keyboard state
274
+/** \brief inspect keyboard state
275
+ *
276
+ * FIXME: needs doc
188 277
  */
189 278
 uint8_t has_anymod(void)
190 279
 {

+ 7
- 8
tmk_core/common/avr/bootloader.c View File

@@ -13,12 +13,11 @@
13 13
 #endif
14 14
 
15 15
 
16
-/* Bootloader Size in *bytes*
16
+/** \brief Bootloader Size in *bytes*
17 17
  *
18 18
  * AVR Boot section size are defined by setting BOOTSZ fuse in fact. Consult with your MCU datasheet.
19 19
  * Note that 'Word'(2 bytes) size and address are used in datasheet while TMK uses 'Byte'.
20 20
  *
21
- *
22 21
  * Size of Bootloaders in bytes:
23 22
  *   Atmel DFU loader(ATmega32U4)   4096
24 23
  *   Atmel DFU loader(AT90USB128)   8192
@@ -28,10 +27,8 @@
28 27
  *   Teensy   halfKay(ATmega32U4)   512
29 28
  *   Teensy++ halfKay(AT90USB128)   1024
30 29
  *
31
- *
32 30
  * AVR Boot section is located at the end of Flash memory like the followings.
33 31
  *
34
- *
35 32
  * byte     Atmel/LUFA(ATMega32u4)          byte     Atmel(AT90SUB128)
36 33
  * 0x0000   +---------------+               0x00000  +---------------+
37 34
  *          |               |                        |               |
@@ -57,7 +54,6 @@
57 54
  *          |  Bootloader   | 512B                   |  Bootloader   | 1KB
58 55
  * 0x7FFF   +---------------+               0x1FFFF  +---------------+
59 56
  */
60
-
61 57
 #define FLASH_SIZE (FLASHEND + 1L)
62 58
 
63 59
 #if !defined(BOOTLOADER_SIZE)
@@ -69,14 +65,17 @@
69 65
 #define BOOT_SIZE_1024 0b010
70 66
 #define BOOT_SIZE_2048 0b000
71 67
 
72
-/*
73
- * Entering the Bootloader via Software
68
+/** \brief Entering the Bootloader via Software
69
+ *
74 70
  * http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html
75 71
  */
76 72
 #define BOOTLOADER_RESET_KEY 0xB007B007
77 73
 uint32_t reset_key  __attribute__ ((section (".noinit")));
78 74
 
79
-/* initialize MCU status by watchdog reset */
75
+/** \brief initialize MCU status by watchdog reset 
76
+ *
77
+ * FIXME: needs doc
78
+ */
80 79
 void bootloader_jump(void) {
81 80
 
82 81
     #if !defined(BOOTLOADER_SIZE)

+ 18
- 1
tmk_core/common/avr/sleep_led.c View File

@@ -18,6 +18,10 @@
18 18
  */
19 19
 #define SLEEP_LED_TIMER_TOP F_CPU/(256*64)
20 20
 
21
+/** \brief Sleep LED initialization
22
+ *
23
+ * FIXME: needs doc
24
+ */
21 25
 void sleep_led_init(void)
22 26
 {
23 27
     /* Timer1 setup */
@@ -33,18 +37,30 @@ void sleep_led_init(void)
33 37
     SREG = sreg;
34 38
 }
35 39
 
40
+/** \brief Sleep LED enable
41
+ *
42
+ * FIXME: needs doc
43
+ */
36 44
 void sleep_led_enable(void)
37 45
 {
38 46
     /* Enable Compare Match Interrupt */
39 47
     TIMSK1 |= _BV(OCIE1A);
40 48
 }
41 49
 
50
+/** \brief Sleep LED disable
51
+ *
52
+ * FIXME: needs doc
53
+ */
42 54
 void sleep_led_disable(void)
43 55
 {
44 56
     /* Disable Compare Match Interrupt */
45 57
     TIMSK1 &= ~_BV(OCIE1A);
46 58
 }
47 59
 
60
+/** \brief Sleep LED toggle
61
+ *
62
+ * FIXME: needs doc
63
+ */
48 64
 void sleep_led_toggle(void)
49 65
 {
50 66
     /* Disable Compare Match Interrupt */
@@ -52,7 +68,8 @@ void sleep_led_toggle(void)
52 68
 }
53 69
 
54 70
 
55
-/* Breathing Sleep LED brighness(PWM On period) table
71
+/** \brief Breathing Sleep LED brighness(PWM On period) table
72
+ *
56 73
  * (64[steps] * 4[duration]) / 64[PWM periods/s] = 4 second breath cycle
57 74
  *
58 75
  * http://www.wolframalpha.com/input/?i=%28sin%28+x%2F64*pi%29**8+*+255%2C+x%3D0+to+63

+ 18
- 2
tmk_core/common/avr/suspend.c View File

@@ -41,6 +41,10 @@ __asm__ __volatile__ (  \
41 41
 )
42 42
 
43 43
 
44
+/** \brief Suspend idle
45
+ *
46
+ * FIXME: needs doc
47
+ */
44 48
 void suspend_idle(uint8_t time)
45 49
 {
46 50
     cli();
@@ -52,7 +56,8 @@ void suspend_idle(uint8_t time)
52 56
 }
53 57
 
54 58
 #ifndef NO_SUSPEND_POWER_DOWN
55
-/* Power down MCU with watchdog timer
59
+/** \brief Power down MCU with watchdog timer
60
+ *
56 61
  * wdto: watchdog timer timeout defined in <avr/wdt.h>
57 62
  *          WDTO_15MS
58 63
  *          WDTO_30MS
@@ -67,6 +72,10 @@ void suspend_idle(uint8_t time)
67 72
  */
68 73
 static uint8_t wdt_timeout = 0;
69 74
 
75
+/** \brief Power down
76
+ *
77
+ * FIXME: needs doc
78
+ */
70 79
 static void power_down(uint8_t wdto)
71 80
 {
72 81
 #ifdef PROTOCOL_LUFA
@@ -111,6 +120,10 @@ static void power_down(uint8_t wdto)
111 120
 }
112 121
 #endif
113 122
 
123
+/** \brief Suspend power down
124
+ *
125
+ * FIXME: needs doc
126
+ */
114 127
 void suspend_power_down(void)
115 128
 {
116 129
 #ifndef NO_SUSPEND_POWER_DOWN
@@ -131,7 +144,10 @@ bool suspend_wakeup_condition(void)
131 144
      return false;
132 145
 }
133 146
 
134
-// run immediately after wakeup
147
+/** \brief run immediately after wakeup
148
+ *
149
+ * FIXME: needs doc
150
+ */
135 151
 void suspend_wakeup_init(void)
136 152
 {
137 153
     // clear keyboard state

+ 24
- 0
tmk_core/common/avr/timer.c View File

@@ -27,6 +27,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
27 27
 // NOTE: union { uint32_t timer32; struct { uint16_t dummy; uint16_t timer16; }}
28 28
 volatile uint32_t timer_count;
29 29
 
30
+/** \brief timer initialization
31
+ *
32
+ * FIXME: needs doc
33
+ */
30 34
 void timer_init(void)
31 35
 {
32 36
 #if TIMER_PRESCALER == 1
@@ -60,6 +64,10 @@ void timer_init(void)
60 64
 #endif
61 65
 }
62 66
 
67
+/** \brief timer clear
68
+ *
69
+ * FIXME: needs doc
70
+ */
63 71
 inline
64 72
 void timer_clear(void)
65 73
 {
@@ -68,6 +76,10 @@ void timer_clear(void)
68 76
   }
69 77
 }
70 78
 
79
+/** \brief timer read
80
+ *
81
+ * FIXME: needs doc
82
+ */
71 83
 inline
72 84
 uint16_t timer_read(void)
73 85
 {
@@ -80,6 +92,10 @@ uint16_t timer_read(void)
80 92
     return (t & 0xFFFF);
81 93
 }
82 94
 
95
+/** \brief timer read32
96
+ *
97
+ * FIXME: needs doc
98
+ */
83 99
 inline
84 100
 uint32_t timer_read32(void)
85 101
 {
@@ -92,6 +108,10 @@ uint32_t timer_read32(void)
92 108
     return t;
93 109
 }
94 110
 
111
+/** \brief timer elapsed
112
+ *
113
+ * FIXME: needs doc
114
+ */
95 115
 inline
96 116
 uint16_t timer_elapsed(uint16_t last)
97 117
 {
@@ -104,6 +124,10 @@ uint16_t timer_elapsed(uint16_t last)
104 124
     return TIMER_DIFF_16((t & 0xFFFF), last);
105 125
 }
106 126
 
127
+/** \brief timer elapsed32
128
+ *
129
+ * FIXME: needs doc
130
+ */
107 131
 inline
108 132
 uint32_t timer_elapsed32(uint32_t last)
109 133
 {

+ 28
- 0
tmk_core/common/backlight.c View File

@@ -21,6 +21,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
 
22 22
 backlight_config_t backlight_config;
23 23
 
24
+/** \brief Backlight initialization
25
+ *
26
+ * FIXME: needs doc
27
+ */
24 28
 void backlight_init(void)
25 29
 {
26 30
     /* check signature */
@@ -34,6 +38,10 @@ void backlight_init(void)
34 38
     backlight_set(backlight_config.enable ? backlight_config.level : 0);
35 39
 }
36 40
 
41
+/** \brief Backlight increase
42
+ *
43
+ * FIXME: needs doc
44
+ */
37 45
 void backlight_increase(void)
38 46
 {
39 47
     if(backlight_config.level < BACKLIGHT_LEVELS)
@@ -46,6 +54,10 @@ void backlight_increase(void)
46 54
     backlight_set(backlight_config.level);
47 55
 }
48 56
 
57
+/** \brief Backlight decrease
58
+ *
59
+ * FIXME: needs doc
60
+ */
49 61
 void backlight_decrease(void)
50 62
 {
51 63
     if(backlight_config.level > 0)
@@ -58,6 +70,10 @@ void backlight_decrease(void)
58 70
     backlight_set(backlight_config.level);
59 71
 }
60 72
 
73
+/** \brief Backlight toggle
74
+ *
75
+ * FIXME: needs doc
76
+ */
61 77
 void backlight_toggle(void)
62 78
 {
63 79
     backlight_config.enable ^= 1;
@@ -68,6 +84,10 @@ void backlight_toggle(void)
68 84
     backlight_set(backlight_config.enable ? backlight_config.level : 0);
69 85
 }
70 86
 
87
+/** \brief Backlight step through levels
88
+ *
89
+ * FIXME: needs doc
90
+ */
71 91
 void backlight_step(void)
72 92
 {
73 93
     backlight_config.level++;
@@ -81,6 +101,10 @@ void backlight_step(void)
81 101
     backlight_set(backlight_config.level);
82 102
 }
83 103
 
104
+/** \brief Backlight set level
105
+ *
106
+ * FIXME: needs doc
107
+ */
84 108
 void backlight_level(uint8_t level)
85 109
 {
86 110
     if (level > BACKLIGHT_LEVELS)
@@ -91,6 +115,10 @@ void backlight_level(uint8_t level)
91 115
     backlight_set(backlight_config.level);
92 116
 }
93 117
 
118
+/** \brief Get backlight level
119
+ *
120
+ * FIXME: needs doc
121
+ */
94 122
 uint8_t get_backlight_level(void)
95 123
 {
96 124
     return backlight_config.level;

+ 13
- 1
tmk_core/common/bootmagic.c View File

@@ -12,6 +12,10 @@
12 12
 
13 13
 keymap_config_t keymap_config;
14 14
 
15
+/** \brief Bootmagic
16
+ *
17
+ * FIXME: needs doc
18
+ */
15 19
 void bootmagic(void)
16 20
 {
17 21
     /* check signature */
@@ -102,6 +106,10 @@ void bootmagic(void)
102 106
     }
103 107
 }
104 108
 
109
+/** \brief Scan Keycode
110
+ *
111
+ * FIXME: needs doc
112
+ */
105 113
 static bool scan_keycode(uint8_t keycode)
106 114
 {
107 115
     for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
@@ -117,9 +125,13 @@ static bool scan_keycode(uint8_t keycode)
117 125
     return false;
118 126
 }
119 127
 
128
+/** \brief Bootmagic Scan Keycode
129
+ *
130
+ * FIXME: needs doc
131
+ */
120 132
 bool bootmagic_scan_keycode(uint8_t keycode)
121 133
 {
122 134
     if (!scan_keycode(BOOTMAGIC_KEY_SALT)) return false;
123 135
 
124 136
     return scan_keycode(keycode);
125
-}
137
+}

+ 2
- 0
tmk_core/common/bootmagic.h View File

@@ -2,6 +2,8 @@
2 2
 #define BOOTMAGIC_H
3 3
 
4 4
 
5
+/* FIXME: Add special doxygen comments for defines here. */
6
+
5 7
 /* bootmagic salt key */
6 8
 #ifndef BOOTMAGIC_KEY_SALT
7 9
 #define BOOTMAGIC_KEY_SALT              KC_SPACE

+ 8
- 0
tmk_core/common/chibios/bootloader.c View File

@@ -13,11 +13,19 @@ extern uint32_t __ram0_end__;
13 13
 #define MAGIC_ADDR (unsigned long*)(SYMVAL(__ram0_end__) - 4)
14 14
 
15 15
 
16
+/** \brief Jump to the bootloader
17
+ *
18
+ * FIXME: needs doc
19
+ */
16 20
 void bootloader_jump(void) {
17 21
   *MAGIC_ADDR = BOOTLOADER_MAGIC; // set magic flag => reset handler will jump into boot loader
18 22
    NVIC_SystemReset();
19 23
 }
20 24
 
25
+/** \brief Enter bootloader mode if requested
26
+ *
27
+ * FIXME: needs doc
28
+ */
21 29
 void enter_bootloader_mode_if_requested(void)  {
22 30
   unsigned long* check = MAGIC_ADDR;
23 31
   if(*check == BOOTLOADER_MAGIC)  {

+ 44
- 0
tmk_core/common/chibios/eeprom.c View File

@@ -79,6 +79,10 @@
79 79
   #define EEESIZE 0x39
80 80
 #endif
81 81
 
82
+/** \brief eeprom initialization
83
+ *
84
+ * FIXME: needs doc
85
+ */
82 86
 void eeprom_initialize(void)
83 87
 {
84 88
 	uint32_t count=0;
@@ -111,6 +115,10 @@ void eeprom_initialize(void)
111 115
 
112 116
 #define FlexRAM ((uint8_t *)0x14000000)
113 117
 
118
+/** \brief eeprom read byte
119
+ *
120
+ * FIXME: needs doc
121
+ */
114 122
 uint8_t eeprom_read_byte(const uint8_t *addr)
115 123
 {
116 124
 	uint32_t offset = (uint32_t)addr;
@@ -119,6 +127,10 @@ uint8_t eeprom_read_byte(const uint8_t *addr)
119 127
 	return FlexRAM[offset];
120 128
 }
121 129
 
130
+/** \brief eeprom read word
131
+ *
132
+ * FIXME: needs doc
133
+ */
122 134
 uint16_t eeprom_read_word(const uint16_t *addr)
123 135
 {
124 136
 	uint32_t offset = (uint32_t)addr;
@@ -127,6 +139,10 @@ uint16_t eeprom_read_word(const uint16_t *addr)
127 139
 	return *(uint16_t *)(&FlexRAM[offset]);
128 140
 }
129 141
 
142
+/** \brief eeprom read dword
143
+ *
144
+ * FIXME: needs doc
145
+ */
130 146
 uint32_t eeprom_read_dword(const uint32_t *addr)
131 147
 {
132 148
 	uint32_t offset = (uint32_t)addr;
@@ -135,6 +151,10 @@ uint32_t eeprom_read_dword(const uint32_t *addr)
135 151
 	return *(uint32_t *)(&FlexRAM[offset]);
136 152
 }
137 153
 
154
+/** \brief eeprom read block
155
+ *
156
+ * FIXME: needs doc
157
+ */
138 158
 void eeprom_read_block(void *buf, const void *addr, uint32_t len)
139 159
 {
140 160
 	uint32_t offset = (uint32_t)addr;
@@ -148,11 +168,19 @@ void eeprom_read_block(void *buf, const void *addr, uint32_t len)
148 168
 	}
149 169
 }
150 170
 
171
+/** \brief eeprom is ready
172
+ *
173
+ * FIXME: needs doc
174
+ */
151 175
 int eeprom_is_ready(void)
152 176
 {
153 177
 	return (FTFL->FCNFG & FTFL_FCNFG_EEERDY) ? 1 : 0;
154 178
 }
155 179
 
180
+/** \brief flexram wait
181
+ *
182
+ * FIXME: needs doc
183
+ */
156 184
 static void flexram_wait(void)
157 185
 {
158 186
 	while (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) {
@@ -160,6 +188,10 @@ static void flexram_wait(void)
160 188
 	}
161 189
 }
162 190
 
191
+/** \brief eeprom_write_byte
192
+ *
193
+ * FIXME: needs doc
194
+ */
163 195
 void eeprom_write_byte(uint8_t *addr, uint8_t value)
164 196
 {
165 197
 	uint32_t offset = (uint32_t)addr;
@@ -172,6 +204,10 @@ void eeprom_write_byte(uint8_t *addr, uint8_t value)
172 204
 	}
173 205
 }
174 206
 
207
+/** \brief eeprom write word
208
+ *
209
+ * FIXME: needs doc
210
+ */
175 211
 void eeprom_write_word(uint16_t *addr, uint16_t value)
176 212
 {
177 213
 	uint32_t offset = (uint32_t)addr;
@@ -199,6 +235,10 @@ void eeprom_write_word(uint16_t *addr, uint16_t value)
199 235
 #endif
200 236
 }
201 237
 
238
+/** \brief eeprom write dword
239
+ *
240
+ * FIXME: needs doc
241
+ */
202 242
 void eeprom_write_dword(uint32_t *addr, uint32_t value)
203 243
 {
204 244
 	uint32_t offset = (uint32_t)addr;
@@ -242,6 +282,10 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value)
242 282
 #endif
243 283
 }
244 284
 
285
+/** \brief eeprom write block
286
+ *
287
+ * FIXME: needs doc
288
+ */
245 289
 void eeprom_write_block(const void *buf, void *addr, uint32_t len)
246 290
 {
247 291
 	uint32_t offset = (uint32_t)addr;

+ 17
- 1
tmk_core/common/chibios/suspend.c View File

@@ -12,11 +12,19 @@
12 12
 #include "suspend.h"
13 13
 #include "wait.h"
14 14
 
15
+/** \brief suspend idle
16
+ *
17
+ * FIXME: needs doc
18
+ */
15 19
 void suspend_idle(uint8_t time) {
16 20
 	// TODO: this is not used anywhere - what units is 'time' in?
17 21
 	wait_ms(time);
18 22
 }
19 23
 
24
+/** \brief suspend power down
25
+ *
26
+ * FIXME: needs doc
27
+ */
20 28
 void suspend_power_down(void) {
21 29
 	// TODO: figure out what to power down and how
22 30
 	// shouldn't power down TPM/FTM if we want a breathing LED
@@ -28,6 +36,10 @@ void suspend_power_down(void) {
28 36
 	wait_ms(17);
29 37
 }
30 38
 
39
+/** \brief suspend wakeup condition
40
+ *
41
+ * FIXME: needs doc
42
+ */
31 43
 __attribute__ ((weak)) void matrix_power_up(void) {}
32 44
 __attribute__ ((weak)) void matrix_power_down(void) {}
33 45
 bool suspend_wakeup_condition(void)
@@ -41,7 +53,11 @@ bool suspend_wakeup_condition(void)
41 53
     return false;