mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-10 07:30:08 -04:00
SYNC
This commit is contained in:
parent
29ec87a9ad
commit
44638e504b
166 changed files with 8700 additions and 3967 deletions
|
@ -43,6 +43,20 @@ void lcd_reset() {
|
|||
chThdSleepMilliseconds(120);
|
||||
}
|
||||
|
||||
void lcd_sleep_in() {
|
||||
io.lcd_data_write_command_and_data(0x10, {});
|
||||
chThdSleepMilliseconds(5);
|
||||
}
|
||||
|
||||
void lcd_sleep_out() {
|
||||
io.lcd_data_write_command_and_data(0x11, {});
|
||||
chThdSleepMilliseconds(120);
|
||||
}
|
||||
|
||||
void lcd_display_on() {
|
||||
io.lcd_data_write_command_and_data(0x29, {});
|
||||
}
|
||||
|
||||
void lcd_init() {
|
||||
// LCDs are configured for IM[2:0] = 001
|
||||
// 8080-I system, 16-bit parallel bus
|
||||
|
@ -149,12 +163,8 @@ void lcd_init() {
|
|||
0x47, 0x04, 0x0C, 0x0B, 0x29, 0x2F, 0x05
|
||||
});
|
||||
|
||||
// Exit Sleep
|
||||
io.lcd_data_write_command_and_data(0x11, {});
|
||||
chThdSleepMilliseconds(120);
|
||||
|
||||
// Display on
|
||||
io.lcd_data_write_command_and_data(0x29, {});
|
||||
lcd_sleep_out();
|
||||
lcd_display_on();
|
||||
|
||||
// Turn on Tearing Effect Line (TE) output signal.
|
||||
io.lcd_data_write_command_and_data(0x35, { 0b00000000 });
|
||||
|
@ -232,6 +242,14 @@ void ILI9341::shutdown() {
|
|||
lcd_reset();
|
||||
}
|
||||
|
||||
void ILI9341::sleep() {
|
||||
lcd_sleep_in();
|
||||
}
|
||||
|
||||
void ILI9341::wake() {
|
||||
lcd_sleep_out();
|
||||
}
|
||||
|
||||
void ILI9341::fill_rectangle(ui::Rect r, const ui::Color c) {
|
||||
const auto r_clipped = r.intersect(screen_rect());
|
||||
if( !r_clipped.is_empty() ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue