示例#1
0
static void progress_timer_handler(unsigned long data)
{
    int i;

    if (s3cfb_check_progress((struct fb_info *)data, progress_pos, CENTERBAR_WIDTH)) {
        for(i = 0; i < CENTERBAR_WIDTH; i++)
        {
            s3cfb_update_framebuffer((struct fb_info *)data,
                                     progress_pos++,
                                     PROGRESS_BAR_START_Y,
                                     (void*)anycall_progress_bar_center,
                                     1,
                                     PROGRESS_BAR_HEIGHT);
        }

        s3cfb_update_framebuffer((struct fb_info *)data,
                                 progress_pos,
                                 PROGRESS_BAR_START_Y,
                                 (void*)anycall_progress_bar_right,
                                 PROGRESS_BAR_WIDTH,
                                 PROGRESS_BAR_HEIGHT);

        progress_timer.expires = (get_jiffies_64() + (HZ/14));
        progress_timer.function = progress_timer_handler;
        add_timer(&progress_timer);
    } else
        s3cfb_stop_progress();

}
示例#2
0
static void s3cfb_start_progress(struct fb_info *fb)
{
    int x_pos;
    init_timer(&progress_timer);

    progress_timer.expires  = (get_jiffies_64() + (HZ/10));
    progress_timer.data     = (long)fb;
    progress_timer.function = progress_timer_handler;
    progress_pos = PROGRESS_BAR_LEFT_POS;

    // draw progress background.
    for (x_pos = PROGRESS_BAR_LEFT_POS ; x_pos <= PROGRESS_BAR_RIGHT_POS ; x_pos += PROGRESS_BAR_WIDTH)
    {
        s3cfb_update_framebuffer(fb,
                                 x_pos,
                                 PROGRESS_BAR_START_Y,
                                 (void*)anycall_progress_bar,
                                 PROGRESS_BAR_WIDTH,
                                 PROGRESS_BAR_HEIGHT);
    }

    s3cfb_update_framebuffer(fb,
                             PROGRESS_BAR_LEFT_POS,
                             PROGRESS_BAR_START_Y,
                             (void*)anycall_progress_bar_left,
                             PROGRESS_BAR_WIDTH,
                             PROGRESS_BAR_HEIGHT);

    progress_pos += PROGRESS_BAR_WIDTH;

    s3cfb_update_framebuffer(fb,
                             progress_pos,
                             PROGRESS_BAR_START_Y,
                             (void*)anycall_progress_bar_right,
                             PROGRESS_BAR_WIDTH,
                             PROGRESS_BAR_HEIGHT);

    add_timer(&progress_timer);
    progress_flag = 1;

}
示例#3
0
static void progress_timer_handler(unsigned long data)
{
	int i;
	for(i = 0; i < 4; i++)
	{
		s3cfb_update_framebuffer((struct fb_info *)data,
			PROGRESS_BAR_START_X,
			progress_pos++,
			(void*)anycall_progress_bar_center,
			1,
			PROGRESS_BAR_HEIGHT);
	}

	if (progress_pos + PROGRESS_BAR_HEIGHT >= PROGRESS_BAR_RIGHT_POS )
	{
		s3cfb_stop_progress();
	}
	else
	{
		progress_timer.expires = (get_jiffies_64() + (HZ/20));
		progress_timer.function = progress_timer_handler;
		add_timer(&progress_timer);
	}
}