diff options
| author | bernard <[email protected]> | 2017-10-10 00:17:58 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2017-10-10 00:17:58 +0800 |
| commit | 01108b525294e1019fcab893dc991e8e17d1fa86 (patch) | |
| tree | f52214cb4f76cffaeb8f4f5cf3c22f5c90604684 /components/gui/src/rtgui_app.c | |
| parent | f8a1bf6fd809be4ce53d17bde1a367aa6bae8187 (diff) | |
[GUI] Update GUI engine code and add Kconfig file.
Diffstat (limited to 'components/gui/src/rtgui_app.c')
| -rw-r--r-- | components/gui/src/rtgui_app.c | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/components/gui/src/rtgui_app.c b/components/gui/src/rtgui_app.c index db3cdd4b2e..b0a7819536 100644 --- a/components/gui/src/rtgui_app.c +++ b/components/gui/src/rtgui_app.c @@ -1,11 +1,21 @@ /* * File : rtgui_app.c - * This file is part of RTGUI in RT-Thread RTOS - * COPYRIGHT (C) 2012, RT-Thread Development Team + * This file is part of RT-Thread GUI Engine + * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rt-thread.org/license/LICENSE + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Change Logs: * Date Author Notes @@ -382,15 +392,15 @@ void rtgui_app_sleep(struct rtgui_app *app, int millisecond) rt_err_t result; rt_uint16_t current_ref; struct rtgui_event *event; - rt_tick_t tick, sleep_tick; - int delta_tick; + rt_tick_t tick, sleep_tick; + int delta_tick; - tick = rt_tick_get(); - millisecond = rt_tick_from_millisecond(millisecond); - if (millisecond == 0) return; + tick = rt_tick_get(); + millisecond = rt_tick_from_millisecond(millisecond); + if (millisecond == 0) return; - sleep_tick = tick + millisecond; - delta_tick = millisecond; + sleep_tick = tick + millisecond; + delta_tick = millisecond; /* point to event buffer */ event = (struct rtgui_event *)app->event_buffer; @@ -418,7 +428,7 @@ void rtgui_app_sleep(struct rtgui_app *app, int millisecond) delta_tick = sleep_tick - rt_tick_get(); } - app->ref_count --; + app->ref_count --; } RTM_EXPORT(rtgui_app_sleep); |
