Test example poop
This commit is contained in:
		
							parent
							
								
									47fbfb0fc2
								
							
						
					
					
						commit
						07d4fddbb8
					
				
							
								
								
									
										22
									
								
								c/src/p2fa.c
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								c/src/p2fa.c
									
									
									
									
									
								
							@ -29,6 +29,27 @@ void Handler(int sigNum) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int draw() {
 | 
					int draw() {
 | 
				
			||||||
 | 
					    Debug("EPD_2in13_V4_test Demo\r\n");
 | 
				
			||||||
 | 
					    if(DEV_Module_Init()!=0){
 | 
				
			||||||
 | 
					        return -1;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    Debug("e-Paper Init and Clear...\r\n");
 | 
				
			||||||
 | 
					    EPD_2in13_V4_Init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    struct timespec start={0,0}, finish={0,0};
 | 
				
			||||||
 | 
					    clock_gettime(CLOCK_REALTIME,&start);
 | 
				
			||||||
 | 
					    EPD_2in13_V4_Clear();
 | 
				
			||||||
 | 
					    clock_gettime(CLOCK_REALTIME,&finish);
 | 
				
			||||||
 | 
					    Debug("%ld S\r\n",finish.tv_sec-start.tv_sec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //Create a new image cache
 | 
				
			||||||
 | 
					    UBYTE *BlackImage;
 | 
				
			||||||
 | 
					    UWORD Imagesize = ((EPD_2in13_V4_WIDTH % 8 == 0)? (EPD_2in13_V4_WIDTH / 8 ): (EPD_2in13_V4_WIDTH / 8 + 1)) * EPD_2in13_V4_HEIGHT;
 | 
				
			||||||
 | 
					    if((BlackImage = (UBYTE *)malloc(Imagesize)) == NULL) {
 | 
				
			||||||
 | 
					        Debug("Failed to apply for black memory...\r\n");
 | 
				
			||||||
 | 
					        return -1;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Paint_NewImage(BlackImage, EPD_2in13_V4_WIDTH, EPD_2in13_V4_HEIGHT, 90, WHITE);
 | 
					    Paint_NewImage(BlackImage, EPD_2in13_V4_WIDTH, EPD_2in13_V4_HEIGHT, 90, WHITE);
 | 
				
			||||||
    Debug("Drawing\r\n");
 | 
					    Debug("Drawing\r\n");
 | 
				
			||||||
    //1.Select Image
 | 
					    //1.Select Image
 | 
				
			||||||
@ -92,6 +113,7 @@ int draw() {
 | 
				
			|||||||
        EPD_2in13_V4_Display_Partial(BlackImage);
 | 
					        EPD_2in13_V4_Display_Partial(BlackImage);
 | 
				
			||||||
        DEV_Delay_ms(500);//Analog clock 1s
 | 
					        DEV_Delay_ms(500);//Analog clock 1s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    DEV_Delay_ms(5000);
 | 
					    DEV_Delay_ms(5000);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Debug("Clear...\r\n");
 | 
					    Debug("Clear...\r\n");
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user