mirror of
				https://github.com/eclipse/upm.git
				synced 2025-11-04 00:54:21 +03:00 
			
		
		
		
	lcd: remove i2c context from LCD base class
This commit removes the I2C context from the LCD base class and moves it into each of the drivers. In addition, the createChar() virtual function was removed from the base class, as it directly used the now non-existant i2c context, and it would not work on anything other than hd44780 based controllers and displays anyway. Also, it is likely the capability itself, as well as the data required to implement it, is going to be different from device to device. createChar() has been added to the Lcm1602 driver which can support it. While doing this work, the LCD base class m_name is now set appropriately in the driver constructors. Signed-off-by: Jon Trulson <jtrulson@ics.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
		
				
					committed by
					
						
						Mihai Tudor Panu
					
				
			
			
				
	
			
			
			
						parent
						
							56f7e97536
						
					
				
				
					commit
					1647f572ff
				
			@@ -24,6 +24,7 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <mraa/i2c.hpp>
 | 
			
		||||
#include "lcd.h"
 | 
			
		||||
 | 
			
		||||
namespace upm
 | 
			
		||||
@@ -113,5 +114,7 @@ class Jhd1313m1 : public LCD
 | 
			
		||||
  private:
 | 
			
		||||
    int m_rgb_address;
 | 
			
		||||
    mraa::I2c m_i2c_lcd_rgb;
 | 
			
		||||
    int m_lcd_control_address;
 | 
			
		||||
    mraa::I2c m_i2c_lcd_control;
 | 
			
		||||
};
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user