chodzikman Posted May 2, 2017 Report Share Posted May 2, 2017 Ok, additional question: is there any desired pattern for testing if flush operation is completed or should I just test DMA peripheral 'low-levelish' directly inside draw pixel? Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted May 2, 2017 Report Share Posted May 2, 2017 Hi, I took your forum post (above) out of the topic you posted it in and created a new one as it was getting heavily off-topic. To your question: There's no high-level API to check whether a flush completed. This is something you'd usually take care of in your low-level driver as you mentioned. If the information is needed in other parts of the application through a high-level interface then using the GDISP Query capabilities is the right way to go (gdispQuery()). Link to comment Share on other sites More sharing options...
inmarket Posted May 2, 2017 Report Share Posted May 2, 2017 I prefer to test for the previous operation completion before starting a new operation (eg in gdisp_draw_pixel) rather than testing for completion of the operation before returning. The reason is simple, doing the test immediately before any new operation allow as much asynchronous operation as possible. The cpu can be preparing for the next drawing operation while the previous operation is still completing. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted May 2, 2017 Report Share Posted May 2, 2017 Yep, that's also how it's done for the DMA2D stuff. That's definitely the better way of doing it. Link to comment Share on other sites More sharing options...
chodzikman Posted May 2, 2017 Author Report Share Posted May 2, 2017 I forgotten to ask you to split these two topics Ok, this is exactly the way I am thinking about it. Just wanted to make sure that I am not thinking against design pattern here BTW, In my Eclipse environment I am constantly dealing with ifdef 'misunderstandings' from Indexer Everything else is working fine, but this is somehow frustrating and prevents me from creating tutorial. Maybe some other users will have some ideas... Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted May 2, 2017 Report Share Posted May 2, 2017 This is normal. The µGFX library heavily relies on the preprocessor. There are very complex constructs in there that those lexers are simply not "smart enough" to comprehend. Furthermore, there are some (or many) things that change during the preprocessing stage. There are defines that get changed one or multiple times during the compilation to create static lists and similar. The sane thing to do is simply disabling the eclipse lexer / interpreter stuff. The compiler is there to tell you when there are issues. Link to comment Share on other sites More sharing options...
chodzikman Posted May 3, 2017 Author Report Share Posted May 3, 2017 Sure, it is fine when you need to write a new thing like a widget, but if I want to replicate a solution or understand/debug something visual inspection of inclusions greatly speeds up the process. The other thing is some of your customers might need to stay along with standards like MISRA C, in this case you will have static code analyzer that checks compliance with allowed subset. (the other thing is if uGFX is anywhere near the subset and if you are interested in this part of market) Link to comment Share on other sites More sharing options...
inmarket Posted May 3, 2017 Report Share Posted May 3, 2017 MISRA C is not something we have investigated yet. I will have a look as soon as I get an opportunity. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now