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
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)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWORLD University ---- PLC Programming Introduction Video Tutorial
- BBC: Driver package for microbit infrared remote control
- How to eliminate the current in IO after power failure
- FPGA_100 Days Tour_Arbitrary Frequency Divider
- iMX6 Series Application Notes - One article teaches you how to use iMX6Q GPIO functions
- After pressing the left mouse button to select a section of content, after releasing the left mouse button, you will find that the selected area is still changing with the cursor position.
- Please help analyze the function of the transistor in this circuit.
- Help: Looking for mc14433 library in proteus
- I want to know about wireless receiving groups and channels, about 433
- LED chip detection problem