Restructorizing

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

Re: Restructorizing

Postby Abhishek » Mon Jul 16, 2012 11:41 am

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: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Restructorizing

Postby Tectu » Mon Jul 16, 2012 11:45 am

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
Location: Bath, UK
Contact:

Re: Restructorizing

Postby Badger » Mon Jul 16, 2012 11:48 am

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
Location: India

Re: Restructorizing

Postby Abhishek » Mon Jul 16, 2012 12:06 pm

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
Location: Bath, UK
Contact:

Re: Restructorizing

Postby Badger » Mon Jul 16, 2012 12:11 pm

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
Location: India

Re: Restructorizing

Postby Abhishek » Mon Jul 16, 2012 12:20 pm

> 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
Location: Bath, UK
Contact:

Re: Restructorizing

Postby Badger » Mon Jul 16, 2012 1:46 pm

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
Location: India

Re: Restructorizing

Postby Abhishek » Mon Jul 16, 2012 2:09 pm

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: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Restructorizing

Postby Tectu » Mon Jul 16, 2012 10:00 pm

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


Return to “LCD Driver and Graphic Framework”

Who is online

Users browsing this forum: No registered users and 4 guests