Do not copy LittleVgl object in DislayApp, use reference instead.
Make Cst816s, SpiMaster and St7789 not copiable and not movable
This commit is contained in:
		
							parent
							
								
									bfecc8118e
								
							
						
					
					
						commit
						d834f40c10
					
				@ -43,7 +43,7 @@ namespace Pinetime {
 | 
				
			|||||||
        static void Process(void* instance);
 | 
					        static void Process(void* instance);
 | 
				
			||||||
        void InitHw();
 | 
					        void InitHw();
 | 
				
			||||||
        Pinetime::Drivers::St7789& lcd;
 | 
					        Pinetime::Drivers::St7789& lcd;
 | 
				
			||||||
        Pinetime::Components::LittleVgl lvgl;
 | 
					        Pinetime::Components::LittleVgl& lvgl;
 | 
				
			||||||
        void Refresh();
 | 
					        void Refresh();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        States state = States::Running;
 | 
					        States state = States::Running;
 | 
				
			||||||
 | 
				
			|||||||
@ -27,6 +27,12 @@ namespace Pinetime {
 | 
				
			|||||||
          bool isTouch = false;
 | 
					          bool isTouch = false;
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Cst816S() = default;
 | 
				
			||||||
 | 
					        Cst816S(const Cst816S&) = delete;
 | 
				
			||||||
 | 
					        Cst816S& operator=(const Cst816S&) = delete;
 | 
				
			||||||
 | 
					        Cst816S(Cst816S&&) = delete;
 | 
				
			||||||
 | 
					        Cst816S& operator=(Cst816S&&) = delete;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        void Init();
 | 
					        void Init();
 | 
				
			||||||
        void Probe();
 | 
					        void Probe();
 | 
				
			||||||
        TouchInfos GetTouchInfo();
 | 
					        TouchInfos GetTouchInfo();
 | 
				
			||||||
 | 
				
			|||||||
@ -26,6 +26,11 @@ namespace Pinetime {
 | 
				
			|||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        SpiMaster(const SpiModule spi, const Parameters& params);
 | 
					        SpiMaster(const SpiModule spi, const Parameters& params);
 | 
				
			||||||
 | 
					        SpiMaster(const SpiMaster&) = delete;
 | 
				
			||||||
 | 
					        SpiMaster& operator=(const SpiMaster&) = delete;
 | 
				
			||||||
 | 
					        SpiMaster(SpiMaster&&) = delete;
 | 
				
			||||||
 | 
					        SpiMaster& operator=(SpiMaster&&) = delete;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        bool Init();
 | 
					        bool Init();
 | 
				
			||||||
        bool Write(const uint8_t* data, size_t size);
 | 
					        bool Write(const uint8_t* data, size_t size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,11 @@ namespace Pinetime {
 | 
				
			|||||||
    class St7789 {
 | 
					    class St7789 {
 | 
				
			||||||
      public:
 | 
					      public:
 | 
				
			||||||
        explicit St7789(SpiMaster& spiMaster, uint8_t pinDataCommand);
 | 
					        explicit St7789(SpiMaster& spiMaster, uint8_t pinDataCommand);
 | 
				
			||||||
 | 
					        St7789(const St7789&) = delete;
 | 
				
			||||||
 | 
					        St7789& operator=(const St7789&) = delete;
 | 
				
			||||||
 | 
					        St7789(St7789&&) = delete;
 | 
				
			||||||
 | 
					        St7789& operator=(St7789&&) = delete;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        void Init();
 | 
					        void Init();
 | 
				
			||||||
        void Uninit();
 | 
					        void Uninit();
 | 
				
			||||||
        void DrawPixel(uint16_t x, uint16_t y, uint32_t color);
 | 
					        void DrawPixel(uint16_t x, uint16_t y, uint32_t color);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user