Skip to content

Commit c784caa

Browse files
maciejbaczmanskirlubos
authored andcommitted
[nrf fromlist] manifest: net: openthread: Regular openthread upmerge to e10a925.
Regular openthread upmerge to `e10a92570f94ff1e0bc5e0da9ecf0ee135d955a6`. Additionally commit aligns platform implementation with diag changes: openthread/openthread#10354 based on: openthread/ot-nrf528xx#822 Upstream PR: zephyrproject-rtos/zephyr#75088 Signed-off-by: Maciej Baczmanski <[email protected]>
1 parent 1d32786 commit c784caa

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

modules/openthread/platform/diag.c

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,39 @@
1616
*
1717
*/
1818
static 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
}

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)