From 9ffea7e261ec4016d788abbbf7c4a6d3a78e0a04 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 18 Sep 2010 06:48:56 +0000 Subject: Documentation improvements, renamed some event APIs. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2179 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/testevt.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'test') diff --git a/test/testevt.c b/test/testevt.c index 677e06d44..079257ac5 100644 --- a/test/testevt.c +++ b/test/testevt.c @@ -77,7 +77,7 @@ static EVENTSOURCE_DECL(es2); static void evt1_setup(void) { - chEvtClear(ALL_EVENTS); + chEvtClearFlags(ALL_EVENTS); } static void h1(eventid_t id) {(void)id;test_emit_token('A');} @@ -130,7 +130,7 @@ ROMCONST struct testcase testevt1 = { static void evt2_setup(void) { - chEvtClear(ALL_EVENTS); + chEvtClearFlags(ALL_EVENTS); } static msg_t thread1(void *p) { @@ -157,12 +157,12 @@ static void evt2_execute(void) { /* * Test on chEvtWaitOne() without wait. */ - chEvtPend(5); + chEvtAddFlags(5); m = chEvtWaitOne(ALL_EVENTS); test_assert(1, m == 1, "single event error"); m = chEvtWaitOne(ALL_EVENTS); test_assert(2, m == 4, "single event error"); - m = chEvtClear(ALL_EVENTS); + m = chEvtClearFlags(ALL_EVENTS); test_assert(3, m == 0, "stuck event"); /* @@ -175,17 +175,17 @@ static void evt2_execute(void) { m = chEvtWaitOne(ALL_EVENTS); test_assert_time_window(4, target_time, target_time + ALLOWED_DELAY); test_assert(5, m == 1, "single event error"); - m = chEvtClear(ALL_EVENTS); + m = chEvtClearFlags(ALL_EVENTS); test_assert(6, m == 0, "stuck event"); test_wait_threads(); /* * Test on chEvtWaitAny() without wait. */ - chEvtPend(5); + chEvtAddFlags(5); m = chEvtWaitAny(ALL_EVENTS); test_assert(7, m == 5, "unexpected pending bit"); - m = chEvtClear(ALL_EVENTS); + m = chEvtClearFlags(ALL_EVENTS); test_assert(8, m == 0, "stuck event"); /* @@ -198,7 +198,7 @@ static void evt2_execute(void) { m = chEvtWaitAny(ALL_EVENTS); test_assert_time_window(9, target_time, target_time + ALLOWED_DELAY); test_assert(10, m == 1, "single event error"); - m = chEvtClear(ALL_EVENTS); + m = chEvtClearFlags(ALL_EVENTS); test_assert(11, m == 0, "stuck event"); test_wait_threads(); @@ -215,7 +215,7 @@ static void evt2_execute(void) { thread2, "A"); m = chEvtWaitAll(5); test_assert_time_window(12, target_time, target_time + ALLOWED_DELAY); - m = chEvtClear(ALL_EVENTS); + m = chEvtClearFlags(ALL_EVENTS); test_assert(13, m == 0, "stuck event"); test_wait_threads(); chEvtUnregister(&es1, &el1); @@ -249,7 +249,7 @@ ROMCONST struct testcase testevt2 = { static void evt3_setup(void) { - chEvtClear(ALL_EVENTS); + chEvtClearFlags(ALL_EVENTS); } static void evt3_execute(void) { -- cgit v1.2.3