mirror of
				https://github.com/revspace/operame
				synced 2025-10-31 03:25:37 +00:00 
			
		
		
		
	Move display init to display.h
This commit is contained in:
		
							parent
							
								
									fa79001736
								
							
						
					
					
						commit
						a9e697066e
					
				| @ -5,8 +5,17 @@ | |||||||
| #include <src/logo.h> | #include <src/logo.h> | ||||||
| #include <list> | #include <list> | ||||||
| 
 | 
 | ||||||
|  | namespace { | ||||||
|     TFT_eSPI        tft; |     TFT_eSPI        tft; | ||||||
|     TFT_eSprite     sprite(&tft); |     TFT_eSprite     sprite(&tft); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void setup_display() { | ||||||
|  |     tft.init(); | ||||||
|  |     tft.fillScreen(TFT_BLACK); | ||||||
|  |     tft.setRotation(1); | ||||||
|  |     sprite.createSprite(tft.width(), tft.height()); | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| void clear_sprite(int bg = TFT_BLACK) { | void clear_sprite(int bg = TFT_BLACK) { | ||||||
|     sprite.fillSprite(bg); |     sprite.fillSprite(bg); | ||||||
|  | |||||||
| @ -156,10 +156,7 @@ void setup() { | |||||||
|     Serial.println("Operame start"); |     Serial.println("Operame start"); | ||||||
| 
 | 
 | ||||||
|     digitalWrite(pin_backlight, HIGH); |     digitalWrite(pin_backlight, HIGH); | ||||||
|     tft.init(); |     setup_display(); | ||||||
|     tft.fillScreen(TFT_BLACK); |  | ||||||
|     tft.setRotation(1); |  | ||||||
|     sprite.createSprite(tft.width(), tft.height()); |  | ||||||
| 
 | 
 | ||||||
|     OperameLanguage::select(T, LANGUAGE); |     OperameLanguage::select(T, LANGUAGE); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user