File tree Expand file tree Collapse file tree 2 files changed +29
-9
lines changed
modules/openthread/platform Expand file tree Collapse file tree 2 files changed +29
-9
lines changed Original file line number Diff line number Diff line change 1616 *
1717 */
1818static bool sDiagMode ;
19+ static void * sDiagCallbackContext ;
20+ static otPlatDiagOutputCallback sDiagOutputCallback ;
1921
20- otError otPlatDiagProcess (otInstance * aInstance ,
21- uint8_t argc ,
22- char * argv [],
23- char * aOutput ,
24- size_t aOutputMaxLen )
22+ static void diag_output (const char * aFormat , ...)
23+ {
24+ va_list args ;
25+
26+ va_start (args , aFormat );
27+
28+ if (sDiagOutputCallback != NULL ) {
29+ sDiagOutputCallback (aFormat , args , sDiagCallbackContext );
30+ }
31+
32+ va_end (args );
33+ }
34+
35+ void otPlatDiagSetOutputCallback (otInstance * aInstance ,
36+ otPlatDiagOutputCallback aCallback ,
37+ void * aContext )
38+ {
39+ OT_UNUSED_VARIABLE (aInstance );
40+
41+ sDiagOutputCallback = aCallback ;
42+ sDiagCallbackContext = aContext ;
43+ }
44+
45+ otError otPlatDiagProcess (otInstance * aInstance , uint8_t aArgsLength , char * aArgs [])
2546{
26- ARG_UNUSED (argc );
2747 ARG_UNUSED (aInstance );
48+ ARG_UNUSED (aArgsLength );
2849
2950 /* Add more platform specific diagnostics features here. */
30- snprintk (aOutput , aOutputMaxLen ,
31- "diag feature '%s' is not supported\r\n" , argv [0 ]);
51+ diag_output ("diag feature '%s' is not supported\r\n" , aArgs [0 ]);
3252
3353 return OT_ERROR_NOT_IMPLEMENTED ;
3454}
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ manifest:
301301 revision : da78aea63159771956fe0c9263f2e6985b66e9d5
302302 path : modules/lib/open-amp
303303 - name : openthread
304- revision : 3873c6fcd5a8a9dd01b71e8efe32ef5dc7923bb1
304+ revision : e10a92570f94ff1e0bc5e0da9ecf0ee135d955a6
305305 path : modules/lib/openthread
306306 - name : percepio
307307 path : modules/debug/percepio
You can’t perform that action at this time.
0 commit comments