On Mar 28, 11:29 am, Sebastien Lelong <[email protected]> wrote: > Indeed. > > I'm about to document and extract the common API, which must be implemented > in device library. I can see some weird things in glcd_common.jal regarding > this. For instance, I want to specify mandatory and optional parameters. In > glcd_common, we have: > > if !defined(GLCD_X_PIXELS) then > const GLCD_X_SIZE = 1 > > else > .... > > GLCD_X_PIXELS must be defined anyway because it's used elsewhere, so we > should remove this logic to explicitely assume it's been previously defined. > Do you agree ?
OK > I was also thinking about letting pen/bg colors being optional, as it is > now: > > if !defined(glcd_background_color) then > const byte GLCD_BACKGROUND_COLOR = 0 > end if > if !defined(GLCD_PEN_COLOR) then > const GLCD_PEN_COLOR = 1 > end if > but since color value can have different meaning, I wonder if this is a good > idea. We need to remember that, for a new device lib implementer, each > parameter which isn't required (because "protected" by some "if defined" > logic), will be left as default in the first developement phase. This can > cause confusion: what must be defined in device lib must be exposed (not > defaulting with "if defined"). I agree, let's remove this option and make pen/background mandatory. maybe an error should be generated if the new device lib implementer forgets to define something. > Please have a look at glcd_common.jal header, I wrote some documentation > about our common API. Will do. 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.
