lcd: changed the OOO generalisation.

Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
This commit is contained in:
Kiveisha Yevgeniy
2014-06-05 15:20:40 +00:00
parent 039b138194
commit 3ce441f0a8
7 changed files with 61 additions and 95 deletions

View File

@ -116,39 +116,6 @@ SSD1308::home () {
* private area
* **************
*/
maa_result_t
SSD1308::i2cReg (maa_i2c_context ctx, int deviceAdress, int addr, uint8_t value) {
maa_result_t error = MAA_SUCCESS;
uint8_t data[2] = { addr, value };
error = maa_i2c_address (ctx, deviceAdress);
error = maa_i2c_write (ctx, data, 2);
return error;
}
maa_result_t
SSD1308::i2Cmd (maa_i2c_context ctx, uint8_t value) {
maa_result_t error = MAA_SUCCESS;
uint8_t data[2] = { 0x80, value };
error = maa_i2c_address (ctx, m_lcd_control_address);
error = maa_i2c_write (ctx, data, 2);
return error;
}
maa_result_t
SSD1308::i2cData (maa_i2c_context ctx, uint8_t value) {
maa_result_t error = MAA_SUCCESS;
uint8_t data[2] = { 0x40, value };
error = maa_i2c_address (ctx, m_lcd_control_address);
error = maa_i2c_write (ctx, data, 2);
return error;
}
maa_result_t
SSD1308::writeChar (maa_i2c_context ctx, uint8_t value) {
if (value < 0x20 || value > 0x7F) {