|
|
@ -103,7 +103,7 @@ void lcd_data(uint8_t data[], uint16_t size) {
|
|
|
|
i2c_stop();
|
|
|
|
i2c_stop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#pragma mark -
|
|
|
|
#pragma mark -
|
|
|
|
#pragma mark GENERAL FUNKTIONS
|
|
|
|
#pragma mark GENERAL FUNCTIONS
|
|
|
|
void lcd_init(uint8_t dispAttr){
|
|
|
|
void lcd_init(uint8_t dispAttr){
|
|
|
|
i2c_init();
|
|
|
|
i2c_init();
|
|
|
|
uint8_t commandSequence[sizeof(init_sequence)+1];
|
|
|
|
uint8_t commandSequence[sizeof(init_sequence)+1];
|
|
|
@ -165,6 +165,16 @@ void lcd_invert(uint8_t invert){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
lcd_command(commandSequence, 1);
|
|
|
|
lcd_command(commandSequence, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void lcd_sleep(uint8_t sleep){
|
|
|
|
|
|
|
|
i2c_start((LCD_I2C_ADR << 1) | 0);
|
|
|
|
|
|
|
|
uint8_t commandSequence[1];
|
|
|
|
|
|
|
|
if (sleep != YES) {
|
|
|
|
|
|
|
|
commandSequence[0] = 0xAF;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
commandSequence[0] = 0xAE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
lcd_command(commandSequence, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
void lcd_set_contrast(uint8_t contrast){
|
|
|
|
void lcd_set_contrast(uint8_t contrast){
|
|
|
|
uint8_t commandSequence[2] = {0x81, contrast};
|
|
|
|
uint8_t commandSequence[2] = {0x81, contrast};
|
|
|
|
lcd_command(commandSequence, sizeof(commandSequence));
|
|
|
|
lcd_command(commandSequence, sizeof(commandSequence));
|
|
|
|