Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wovo committed Jun 14, 2021
1 parent 0f48619 commit 193af4b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions library/graphics/hwlib-graphics-window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class window : public noncopyable {
/// The default implementation writes to all pixels in sequence.
/// A concrete window can provide a faster implementation.
virtual void clear_implementation(
color col
color col = unspecified
){
for( const auto p : all( size ) ){
write_implementation( p, col.specify( background ) );
Expand Down Expand Up @@ -87,7 +87,7 @@ class window : public noncopyable {
size{ size },
background{ background },
foreground{ foreground }
{ clear( background ); }
{}

/// write a pixel
///
Expand Down
5 changes: 4 additions & 1 deletion library/peripherals/hwlib-glcd-oled.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ class glcd_oled_i2c_128x64_direct : public ssd1306_i2c, public window {
ssd1306_initialization,
sizeof( ssd1306_initialization ) / sizeof( uint8_t )
);
clear();
}

void flush() override {}
Expand Down Expand Up @@ -394,7 +395,7 @@ class glcd_oled_spi_128x64_direct_res_dc_cs :
command( ssd1306_commands::display_all_on_resume );
command( ssd1306_commands::normal_display );
command( ssd1306_commands::display_on );

clear();
}

void clear_implementation( color c ) override {
Expand Down Expand Up @@ -454,6 +455,7 @@ class glcd_oled_i2c_128x64_buffered : public ssd1306_i2c, public window {
ssd1306_initialization,
sizeof( ssd1306_initialization ) / sizeof( uint8_t )
);
clear();
}

void flush() override {
Expand Down Expand Up @@ -527,6 +529,7 @@ class glcd_oled_i2c_128x64_fast_buffered : public ssd1306_i2c, public window {
ssd1306_initialization,
sizeof( ssd1306_initialization ) / sizeof( uint8_t )
);
clear();
}

void flush() override {
Expand Down
2 changes: 2 additions & 0 deletions library/peripherals/hwlib-glcd-st7789.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ class st7789_spi_dc_cs_rst : public st7789, public window {
wait_ms( 100 );
command( commands::DISPON );
wait_ms( 100 );

clear();
}

void flush() override {
Expand Down

0 comments on commit 193af4b

Please sign in to comment.