u8g2 icon indicating copy to clipboard operation
u8g2 copied to clipboard

Using interrupts to do non-blocking display updates

Open grayxr opened this issue 1 year ago • 1 comments

Hi, thank you so much for maintaining this library, it's great, and I'm using it to do the graphics on my groovebox, using an SSD1309 128x64 OLED with SPI and a Teensy 4.1.

I was looking at the display driver code for the O_C eurorack CV / audio module. There are some conditionals in there for Teensy4.1 hardware to use FIFO with an interrupt rather than DMA to do calls to the display without blocking the main loop (AFAIK).

I was wondering if there is a feasible way to retrofit this sort of approach for my particular configuration and still use the u8g2 library user functions. I'm using u8g2 in my code with the U8G2_SSD1309_128X64_NONAME0_F_4W_SW_SPI class.

My reason for trying this is in order to keep the main loop dedicated to real time audio since I'm doing some time critical buffered playback of audio files from an SD card. I don't want to have to use DMA or a second microcontroller if I don't have to, but I know that is what some opt for. Plus DMA is way out of my current depth.

Thank you!

grayxr avatar Sep 18 '24 00:09 grayxr

Anything else than the standard Arduino API functions is difficult for me. Of course it is doable by re-implementing the low level functions: https://github.com/olikraus/u8g2/wiki/Porting-to-new-MCU-platform

olikraus avatar Sep 18 '24 11:09 olikraus