From f90a0f37906a9363a6e702d8ac1c4c8257370efa Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 16 Sep 2012 09:08:43 +0000 Subject: Removed flags handling in BaseAsynchronousChannel. Modified serial drivers to use the new event flags. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4671 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/Win32-MinGW/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'demos/Win32-MinGW/main.c') diff --git a/demos/Win32-MinGW/main.c b/demos/Win32-MinGW/main.c index dc6e3685a..7514faebf 100644 --- a/demos/Win32-MinGW/main.c +++ b/demos/Win32-MinGW/main.c @@ -147,16 +147,18 @@ static void termination_handler(eventid_t id) { } } +static EventListener sd1fel, sd2fel; + /** * @brief SD1 status change handler. * * @param[in] id event id. */ static void sd1_handler(eventid_t id) { - chnflags_t flags; + flagsmask_t flags; (void)id; - flags = chnGetAndClearFlags(&SD1); + flags = chEvtGetAndClearFlags(&sd1fel); if ((flags & CHN_CONNECTED) && (shelltp1 == NULL)) { cputs("Init: connection on SD1"); shelltp1 = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO + 1); @@ -175,10 +177,10 @@ static void sd1_handler(eventid_t id) { * @param[in] id event id. */ static void sd2_handler(eventid_t id) { - chnflags_t flags; + flagsmask_t flags; (void)id; - flags = chnGetAndClearFlags(&SD2); + flags = chEvtGetAndClearFlags(&sd2fel); if ((flags & CHN_CONNECTED) && (shelltp2 == NULL)) { cputs("Init: connection on SD2"); shelltp2 = shellCreate(&shell_cfg2, SHELL_WA_SIZE, NORMALPRIO + 10); @@ -201,7 +203,7 @@ static evhandler_t fhandlers[] = { * Simulator main. * *------------------------------------------------------------------------*/ int main(void) { - EventListener sd1fel, sd2fel, tel; + EventListener tel; /* * System initializations. @@ -236,10 +238,8 @@ int main(void) { */ cputs("Shell service started on SD1, SD2"); cputs(" - Listening for connections on SD1"); - (void) chnGetAndClearFlags(&SD1); chEvtRegister(chnGetEventSource(&SD1), &sd1fel, 1); cputs(" - Listening for connections on SD2"); - (void) chnGetAndClearFlags(&SD2); chEvtRegister(chnGetEventSource(&SD2), &sd2fel, 2); /* -- cgit v1.2.3