The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
I'm not sure if I even fully understand the problem but it sounds a bit like you could benefit from a design change where you maintain state information for each draw mode. This would allow you to switch between modes without loosing anything since all relevant data would be saved before switching modes.
I don't have that kind of memory. The e-paper displays essentially require me to keep the frame buffer around in local RAM. So my size in bytes for monochrome black and white displays is width*height/8 and it gets worse when you introduce virtualization of higher bit depths through dithering, such that you can simulate 8-bit grayscale for example, but at that point your frame buffer size becomes simply width*height in bytes. Ouch. That's my state for each mode.
It's not a good idea to hold a frame buffer around when someone is not using it on these devices. The devices I'm targeting with these displays range in RAM anywhere from about 300k to 4.5MB, with the caveat that 4MBs of that is PSRAM over SPI and thus slow.
In the past, I had to solve that kind of problem by using buffer switching. To do that you can save the buffer to the PSRAM and then when you switch back to it you can save the current buffer and then load the next buffer if it was saved.
I mean yes, but there's a number of problems with that.
For starters, there might not be room in NVS flash to do that.
Second, it's a performance killer
And finally, it doesn't seem that intuitive to hold the screen buffer for multiple simultaneous screen modes around when a screen can only display one at a time. Or at least I should say I can think of as many arguments as to why it's counterintuitive as the opposite.
So given that, it's not a route I'm taking. I've actually finished 80% of this driver now - the last bit being a dithering algorithm i need to work out that takes advantage of 4 color grayscale rather than simply black and white.
I suspect he was just trying to uninstall himself ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
I'm not ready to ascribe that to anything other than a twist of fate smacking a guy right between the eyes. McAfee was the type of person to say something like that for attention. It doesn't make me think he didn't commit suicide. In fact, if I were the sort, and in his shoes, I might consider the suicide in light of that tweet as an opportunity to make myself more infamous in death.
I'm not putting the latest posthumous post him either though.
I realize Mr. McAfee hasn't had anything to do with the company that bears his name in a long time. That said...
The McAfee enterprise products are a source of continuing aggravation for me at work. The "Adaptive Threat Protection" feature watches writes to files that are or may be executable, and quarantines them. Any compilation process is therefore prone to failure. The ATP service(s) lock the files they are analyzing and fail to release the locks in a timely fashion. The most common failure is when Visual Studio is embedding a manifest resource in an executable. The failure is timing dependent, so hitting "Build solution" again usually fixes it. The worst failure involved Inno Setup, however. In one case during an Inno Setup compile ATP terminated the Inno Setup compile process and ing deleted every single file that process had open, including the source scripts that were being compiled. Since I hadn't checked these files in for over an hour, I lost an hour's worth of work. Our corporate IT has not been helpful.
Consider yourself lucky. I've not been able to convince the corporate IT yabbos to disable this crap on my machine. They've "adjusted my profile" and "assigned me to a low-risk user group" and other sorts of things, none of which have had a long-lasting and reliable effect.
Count your blessings! McAfee is more of a virus than the viruses it supposedly protects us from.
In my section about every 6 months it goes crazy for 1 person, consuming 90%+ of the CPU for a 3 hour scan every morning. Desktop suppport's solution: uninstall and reinstall McAfee. But no one knows the cause ...
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
Last Visit: 31-Dec-99 18:00 Last Update: 20-May-22 11:31