@
lupyuen hehe easier said than done, that's why I gave up on the OpenGL ES / LIMA for now, its like navigating a new city with a mostly compatible map, and a guide book listing possible alternative street name signs, but then also not knowing how to drive
Anyway I read your informative article about the LCD backlight, nice work figuring out the missing register for the PWM! although it didnt stop me from trying to use the wrong one at first
but at least now I can dim the screen, although not sure what limits the values have.
btw I like your approach listening to how other software touches the registers, great idea!
I found the motor control, but then reaslised I needed something asynchronous to switch it off again...
So I have been playing with the Timer registers, thinking a 200ms delay and callback to switch it off would work. So that involved trying to move some interrupt code up into Zig, although I didnt get far.
First I couldnt work out how to pass a Zig function handle down to the 'C' layer for the interrupt callback. So instead I tried a single call from C to Zig for all interrupts. That worked perfect for the first interrupt, but when I ported my VOL button code to use the same approach, I found my export fn within a struct ended up as a duplicate symbol on the zig side
So back to the drawing board
but at least I got the timer working!
now I need to understand it better hehe. It looks like nuttx stores stack state whilst the interrupt is called, so shouldnt be any threading/memory guard issues here either right?