> I read in the glcd_common library that it is recommended to have a
> glcd_clear_screen() procedure in the glcd device-libraries when
> block-writes are not supported.
> Q1: what are block writes?

Block writes are a fast way to draw a square or rectangular area (for
lcd's that support it). At this point maybe only stm032qvt.

For example, you could draw a block from 0,0 to 1,1

1. send the glcd the block area to write to (0,0,1,1)
2. send data for 0,0
3. send data for 0,1
4. send data for 1,0
5. send data for 1,1

You could see how this would be useful for drawing a picture or font
character that matches in bit/byte order. See the font lib.

stm032qvt sends 2 bytes of data per pixel (the color) during block
writes. If you draw pixel by pixel, you would have to send command +
coordinates + color = 12 bytes.

> When block writes are not supported a generic glcd_clear_screen()
> procedure is defined in glcd_common. Apart from clearing the screen it
> sets the char_x and -y positions to zero. As far as I know this cannot
> be done in the glcd-device library because glcd_common must be included
> after the glcd-device library.
> Q2: How do we to that?

My opinion is that setting char_x and char_y in the clear screen
procedure is pointless. It is there because it was there before Seb
and I looked at it.

However, we could prototype a glcd_reset_char_pos() procedure in the
glcd's device lib. reset_char_pos() would go in glcd_common and reset
the values.

> Q3: What is 'fonts with horizontal bit alignment'?
>      Where can I read about this

The above block write is top left horizontal, it is best to use a font
that matches in bit order.

You can see that I started writing in the top left, then write
horizontally before going to the next line.

> Although I currently have only a KS0108 based glcd, I have looked in the
> other glcd libraries. I'm afraid I have some comments:
>
> 1. Many 'public' functions and procedures do not have a generic name
> (starting with 'glcd_'), but start with 'nokia' or 'stm' or 'touch'.
> This is not the way we should provide libraries! It makes switching
> between glcd's not very easy while we try with Jallib to make everything
> device independent as far as possible/reasonable.

This is why there is a glcd_common. It has generic proc names for all
glcd's

I think Seb didn't like some procedures in glcd_common and went with
his own for nokia lib, and therefore the nokia sample uses some nokia
procedures directly. Actually I think he has no choice but to use some
kind of lcd update procedure.

A quick look at my sample 18f4620_glcd_touch_stm032qvt_003.jal shows
that I only use glcd_ procs in the user code. Nothing starting with
stm_ or alike. Is this what you like?

> 2. The doc files generated from the glcd library sources are in many
> aspects not very helpful: many 'no documentation found' clauses, many
> procedures and functions have no specification of arguments and return
> values, very few explanations, etc.
> I know that programmers don't like to make documentation, but most (new)
> users need it!

Personally I think we need a standard template for notes on every
procedure. Something that is even readable by an IDE. That's another
topic however. I agree that notes on libs are a mess, I always try to
put notes on all my procesures.

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to