You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCU/other hardware in use: Arduino UNO R3/OLED Waveshare 0.96 cala (A)
Display resolution and interface: SPI, 128x64
Description of feature request
I tried create (in my project) custom mode (NonBufferedGraphicsMode) due to limitation of SRAM in my Arduino UNO R3. However Ssd1306 offer only into_buffered_graphics_mode and into_terminal_mode. I think public into_mode or public members of Ssd1306 can be helpful (I don't know, I don't have solution yet). Or maybe this is possible, but I don't know some rusty trick? If not (possible), what do you think about such improvement? GO, NOGO - and fork is my only option? I don't think that pushing more modes into driver code is good idea, but interface for customization looks handy.
Loose skeleton, how this could look like at the end.
#[derive(Clone,Debug)]pubstructNonBufferedGraphicsMode{// ...}implNonBufferedGraphicsMode{// ...}// Trick to extend Ssd1306 (which is in his own crate)pubstructNonBufferedGraphicsModeWrapper<DI,SIZE>(Ssd1306<DI,SIZE,NonBufferedGraphicsMode>);impl<DI,SIZE>NonBufferedGraphicsModeWrapper<DI,SIZE>whereDI:WriteOnlyDataCommand,SIZE:DisplaySize,{// ...}impl<DI,SIZE>DrawTargetforNonBufferedGraphicsModeWrapper<DI,SIZE>whereDI:WriteOnlyDataCommand,SIZE:DisplaySize,{fndraw_iter<I>(&mutself,pixels:I) -> Result<(),Self::Error>whereI:IntoIterator<Item = Pixel<Self::Color>>,{// ...}}// Integration letmut custom_mode = NonBufferedGraphicsModeWrapper::new();letmut display = Ssd1306::new(interface,DisplaySize128x64,DisplayRotation::Rotate0).into_mode(custom_mode);
The text was updated successfully, but these errors were encountered:
ssd1306
in use (if applicable): 0.8.4Description of feature request
I tried create (in my project) custom mode (
NonBufferedGraphicsMode
) due to limitation of SRAM in my Arduino UNO R3. HoweverSsd1306
offer onlyinto_buffered_graphics_mode
andinto_terminal_mode
. I think publicinto_mode
or public members ofSsd1306
can be helpful (I don't know, I don't have solution yet). Or maybe this is possible, but I don't know some rusty trick? If not (possible), what do you think about such improvement? GO, NOGO - and fork is my only option? I don't think that pushing more modes into driver code is good idea, but interface for customization looks handy.Loose skeleton, how this could look like at the end.
The text was updated successfully, but these errors were encountered: