|
Yeah,
You probably should just listen to what @Rick-York said about keeping those macros[^]. I didn't respond to your post but you would probably need to __inline those functions to get the same result. I assume that your problems are timing based issues.
Best Wishes,
-David Delaune
|
|
|
|
|
They are inlined. And given it works until I bring the ESP-IDF into it I don't think it's timing. I am creating a repro using macros though.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: I don't think it's timing.
Do you have this up on Github? I can't think of many other reasons your changes would break the existing functionality. Regardless of the platform you are using, converting the macros to functions will result in a prolog and epilog[^] around the instructions.
Keep in mind that the __inline keyword is a compiler hint. The compiler might decide to produce a function and ignore your suggestion.
I'm drinking red wine again (it's the Christmas month holidays) so feel free to ignore me.
Edit:
Don't bother complaining about the x64 MSDN link, it doesn't matter, __inline is a compiler hint. Use a disassembler to view what is being produced.
|
|
|
|
|
I do. I'm producing a simpler repro because I've got a thread going on the ESP32 subreddit about it.
Apologies for the size and relative complexity of this one. It's also test code so it's not cleaned up like it should be although the relative structure is clean enough.
GitHub - codewitch-honey-crisis/tftespip8test[^]
I've checked the inlining at Compiler Explorer[^] and it's working as expected. I have a FORCE_INLINE macro to ham-fistedly tell GCC i'm not kidding. It uses __attribute((always_inline)) so it's stronger than __inline I think. I'm targeting GCC specifically so it's no big deal.
The necessary magic will be in the first class in this file: tftespip8test/tft_io.hpp at master · codewitch-honey-crisis/tftespip8test · GitHub[^]
Although it doesn't do DMA until it's triggered in the copy_from template method in tftespip8test/ili9341.hpp at master · codewitch-honey-crisis/tftespip8test · GitHub[^]
The issue is that as soon as the bus::initialize_dma() is called, no further bus::write_raw8 calls will function. Only write_raw_dma which I can't use for everything. I need to be able to use both. I know it's possible because other code does it.
Real programmers use butterflies
|
|
|
|
|
Well,
That doesn't help. The code you are showing me produces 30+ JMP instructions in addition to the potential prologue and epilogue.
i'm buzzing, I'll look again tomorrow.
|
|
|
|
|
the io bus code should not be doing that. code that calls it is another story.
tft_spi is the thing that should be inlined. The rest doesn't matter
Real programmers use butterflies
|
|
|
|
|
|
so, when you extend your main display to all other displays the taskbar has no date time on the extended displays? I wonder why they would take the time to remove that feature that has been present for so many years.
|
|
|
|
|
I guess it's in preparation for Windows 12.
"We added a clock on all monitors! Hurray!"
|
|
|
|
|
Announcing Windows 11 Insider Preview Build 22518 | Windows Insider Blog[^]
Quote: Starting with Build 22509, we began rolling out a change to display your clock and date will now also be displayed on the taskbars of the secondary monitor or monitors. This is now available to all Insiders in the Dev Channel.
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
Oooooooh....
So, when will it be available to us peon not using insiders build?
At any rate ElevenClock is working pretty nicely!
|
|
|
|
|
Super Lloyd wrote: So, when will it be available to us peon not using insiders build?
There is no way to know it... Microsoft plans to roll out some of the features/fixes as individual fixes (KB), and some group together to larger updates (every 3 months or so)...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
They set it to the default that most IT departments set it to - time only on the primary monitor.
|
|
|
|
|
Slacker007 wrote: I wonder why they would take the time - was that intentional?
I just have a battery LCD clock (synchronised via radio time signal) next to my monitor. It always displays the time, even when the PC is off including during power cuts.
|
|
|
|
|
I have a cell phone that always shows the date and time. My cell phone is with me always.
I have not worn a wrist watch or had a stand alone clock/alarm in years.
However, when using the computer, it is convenient sometimes to just glance down in the right corner and see the BLOODY DATE AND TIME.
|
|
|
|
|
Clocks are all over the place. The radio controlled clock on the wall. The tabletop radio that plays music even when the PC is restarting or off the network. The TV set. On the kitchen stove, microwave and baking oven. In the car, both the radio and the GPS. The living room thermometer. The bathroom thermometer. The phone, too, but usually one of the others are within sight without having to pick anything up. If I pick up my SLR camera, it shows time and date as well. I used to have a keyboard that showed the time in a small display.
Not all of them switch automatically to daylight saving time. A couple of them must be reset when I replace batteries. Not all of them display the weekday. They are not all perfect and complete. But they provide what I need the most.
|
|
|
|
|
Windows 11 also taught me something else: I regularly need to know the seconds when programming.
Luckily that 3rd party clock app can also display seconds!
|
|
|
|
|
lmoelleb wrote: I regularly need to know the seconds when programming. What for?
|
|
|
|
|
I was wondering as well!
|
|
|
|
|
It's not it happens every day (far from it), I was just surprised it happens as often as it does (every few weeks).
Old legacy code written by people who where young, eager, and smart... but unfortunately not experienced. For example, they introduced events - but use them as commands. So instead of the event handler listening to whatever it needs - whatever the event needs is required to send an event targeting the handler. Yikes. If they had just used a method call it would have been a lot easier debug. When checking log files etc (what happened before we got here), correlation to the current time within 10-20 seconds is handy now and then... saves me from waiting until the minutes tick over before hitting F5.
And also for very rude check of performance check as a first step to see if it is worth profiling or anything - i.e. used to take 12 seconds - with my new change it is taking 11 - no need to investigate further. And yes, you should of course have more systematic performance test anyways - but let's just say I am looking forward to the day where lack of systematic performance test is our most serious problem.
|
|
|
|
|
I have been watching a Udemy course where the presenter often shows his PC screen. A couple of times when I have been viewing in full screen mode, I have glanced at the time in the bottom right-hand corner and been surprised how late it was only to realise that it was the presenter's clock on the PC in the video, not the one on my PC.
|
|
|
|
|
damn!
well the good news someone told me the clock is back! On the insider builds... We will have to wait...
|
|
|
|
|
|
But usually it's the PHBs who have ideas which we developers say can't be done.
I wonder if the PHB's office is bugged by the competitor.
|
|
|
|
|
That would be a good follow-up, to have them discover a bug in PHB's office. And naturally, it's the Elbonians!
|
|
|
|