WINCE6 boot progress bar

Publisher:Whisper123Latest update time:2024-08-02 Source: cnblogsKeywords:WINCE6 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The general idea is to add a boot progress bar in NBoot or EBoot. Since WINCE startup mainly takes time to read NK, every time a certain page is read, a line of fixed height is drawn on the screen, and the position of the line is recorded. The line will be drawn next time until NK is finished reading, thus creating the effect of a progress bar.

Reference Mini2440 Nboot.


First define the color, position, length and width of the progress bar. The key codes are as follows:


1 #define PROGRESS_BAR_R 0x00

2 #define PROGRESS_BAR_G 0xFF

3 #define PROGRESS_BAR_B 0x00

4

5 //Set the position, length and width of the launch bar

6 #define PROGRESS_BAR_TOP 225

7 #define PROGRESS_BAR_LEFT 145

8 #define PROGRESS_BAR_WIDTH 512

9 #define PROGRESS_BAR_HEIGHT 20

10 #define PROGRESS_BAR_COLOR ( ( (PROGRESS_BAR_R >> 3) << 11) | ((PROGRESS_BAR_G >> 2) << 5) | (PROGRESS_BAR_B >> 3) )

11


Calculate the position of the line to be drawn before reading NK


1 unsigned char *LCDCurrentAddr;

2

3 LCDCurrentAddr = (unsigned char *)LCD_ADDR + PROGRESS_BAR_TOP * LCD_WIDTH * 2 + PROGRESS_BAR_LEFT * 2;// LCD_ADDR is the screen address

4

According to the NK length and the length of the strip, calculate how many pages are read and draw a line. The key code for drawing lines


1 unsigned short *p = (unsigned short *)LCDCurrentAddr;

2 for (y = 0; y < PROGRESS_BAR_HEIGHT; y++)

3 {

4 *p = PROGRESS_BAR_COLOR;

5 p += LCD_WIDTH;

6 }

7 LCDCurrentAddr += 2;

8


Keywords:WINCE6 Reference address:WINCE6 boot progress bar

Previous article:S3C2440 WINCE6 changes USB DEVICE to USB HOST and implements two USB HOSTs
Next article:MINI2440 updates NK and nboot from SD card (Part 2)

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号