Restructorizing

Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: Restructorizing

Post by Abhishek »

Alright, but I thought I might raise this idea so that during restructuring, our codebase is ready for such a thing in the future.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: Restructorizing

Post by Tectu »

Yeah sure! I thank you for the idea, and of course it will be noted. I did ask for ideas :)

What would you suggest regarding to the glcd wrapper, what should be the next step beside the cursor fixing?


~ Tectu
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: Restructorizing

Post by Badger »

Do we still need a 'cursor'? I think any function that needed the position should have the cursor x/y as parameters.
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: Restructorizing

Post by Abhishek »

Yeah, we do need a cursor to direct stream write operations. But only once per stream write.
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: Restructorizing

Post by Badger »

doesn't write stream use currently defined window? either way, the settings should be passed to the write stream function as an extra parameter.

we also need to be careful that when code changes the active window on the LCD it is reset before other functions use it.
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: Restructorizing

Post by Abhishek »

> The settings should be passed to the write stream function as an extra parameter.
It could be done that way.

However interestingly enough, the set window register setting does not affect the cursor in my S6D1121. It expects the cursor to be reset after the window address is configured, otherwise I get wrong output. I experienced this while implementing the fill area method.
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: Restructorizing

Post by Badger »

Abhishek wrote:However interestingly enough, the set window register setting does not affect the cursor in my S6D1121. It expects the cursor to be reset after the window address is configured, otherwise I get wrong output. I experienced this while implementing the fill area method.

Then this should be done as part of the 'set window' function for that particular device driver.
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: Restructorizing

Post by Abhishek »

Yeah Badger, it's done that way currently in my driver.

An implementation of the bitmap format would require me to position the cursor in the bottom left corner unlike the current top left corner. I wonder how will it be done if implemented that way.

Abhishek
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: Restructorizing

Post by Tectu »

Okay, I did remove lcdSetCursor() since nothing inside the glcd.c uses that function. It's already the case that every lld function sets the cursor itself.


~ Tectu
Locked