Commit cc5385d
committed
Add UNITY_OUTPUT_START/COMPLETE_HEADER_DECLARATION macros (closes #799).
`UNITY_OUTPUT_CHAR` and `UNITY_OUTPUT_FLUSH` already let users provide
their own extern prototype via the matching `*_HEADER_DECLARATION` macro
(unity_internals.h:333-335 and :349-351). `UNITY_OUTPUT_START` and
`UNITY_OUTPUT_COMPLETE` did not — so users wanting to install init /
deinit hooks (e.g. serial port open/close, RTT/JTAG bring-up) could
override the macro but had no Unity-sanctioned way to declare the
function prototype.
Add the matching `_HEADER_DECLARATION` triad for both `START` and
`COMPLETE`, mirroring the FLUSH pattern verbatim. Add the corresponding
commented-out documentation lines to examples/unity_config.h so users
discover the new option alongside the existing ones.
Purely additive — the new code path only activates when the user
defines both `UNITY_OUTPUT_START` (or `_COMPLETE`) AND the matching
`*_HEADER_DECLARATION`. Default no-op behaviour is unchanged.1 parent c7b0faa commit cc5385d
2 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
366 | 371 | | |
367 | 372 | | |
368 | 373 | | |
369 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
370 | 380 | | |
371 | 381 | | |
372 | 382 | | |
| |||
0 commit comments