This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 30df08127 examples: fix noteprint compile error
30df08127 is described below
commit 30df081276dadea2cf6f6e2f87ff8e302e2555e4
Author: yinshengkai <[email protected]>
AuthorDate: Tue Oct 8 19:58:24 2024 +0800
examples: fix noteprint compile error
The sched_note_string/bprintf/dump interfaces have been removed and
replaced with printf and event
Signed-off-by: yinshengkai <[email protected]>
---
examples/noteprintf/noteprintf_main.c | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/examples/noteprintf/noteprintf_main.c
b/examples/noteprintf/noteprintf_main.c
index 8fa628340..5a9df5d4a 100644
--- a/examples/noteprintf/noteprintf_main.c
+++ b/examples/noteprintf/noteprintf_main.c
@@ -81,30 +81,29 @@ int main(int argc, FAR char *argv[])
{
sched_note_printf(NOTE_TAG_ALWAYS,
"shced note test count = %d.", count++);
- sched_note_string(NOTE_TAG_ALWAYS, str);
- sched_note_dump(NOTE_TAG_ALWAYS, 1, &binary, sizeof(struct binary));
- sched_note_bprintf(NOTE_TAG_ALWAYS, 2, "%hhd", c);
- sched_note_bprintf(NOTE_TAG_ALWAYS, 3, "%hd", s);
- sched_note_bprintf(NOTE_TAG_ALWAYS, 4, "%d", i);
- sched_note_bprintf(NOTE_TAG_ALWAYS, 5, "%ld", l);
+ sched_note_mark(NOTE_TAG_ALWAYS, str);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%hhd", c);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%hd", s);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%d", i);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%ld", l);
#ifdef CONFIG_HAVE_LONG_LONG
- sched_note_bprintf(NOTE_TAG_ALWAYS, 6, "%lld", ll);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%lld", ll);
#endif
- sched_note_bprintf(NOTE_TAG_ALWAYS, 7, "%jd", im);
- sched_note_bprintf(NOTE_TAG_ALWAYS, 8, "%zd", sz);
- sched_note_bprintf(NOTE_TAG_ALWAYS, 9, "%td", ptr);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%jd", im);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%zd", sz);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%td", ptr);
#ifdef CONFIG_HAVE_FLOAT
- sched_note_bprintf(NOTE_TAG_ALWAYS, 10, "%e", f);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%e", f);
#endif
#ifdef CONFIG_HAVE_DOUBLE
- sched_note_bprintf(NOTE_TAG_ALWAYS, 11, "%le", d);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%le", d);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
- sched_note_bprintf(NOTE_TAG_ALWAYS, 12, "%Le", ld);
+ sched_note_printf(NOTE_TAG_ALWAYS, "%Le", ld);
#endif
- sched_note_bprintf(NOTE_TAG_ALWAYS, 13,
- "%hhd %hd %d %ld %lld %jd %zd %td",
- c, s, i, l, ll, im, sz, ptr);
+ sched_note_printf(NOTE_TAG_ALWAYS,
+ "%hhd %hd %d %ld %lld %jd %zd %td",
+ c, s, i, l, ll, im, sz, ptr);
usleep(10);
}