On 11 Oct 2008, at 14:08 , Joep Suijs wrote:
> Similar, I want to have the same interface on all serial libs. And
> probably als on lcd libs.
I agree. But now we have to define "same".
Would like exactly the same, as in:
lcd_clear()
lcd_line_4()
or is this OK too:
lcd_clear_hd44780()
lcd_line_4_serial()
> I can imagine this is less relevant for temperature sensors, because
> the interaction is less complex: each sensor is read at one place in
> the program and the result is taken for processing. So switching
> library only requires limited changes in the main program.
These are the limited changes I mean: a search-n-replace for
"hd44780", to replace with "serial", for instance.
This way the namespaces do not collide, everything is clear and still
easy to change.
And yes, you can use both at the same time.
With the function first, the purpose is also clear, to newbies as
well. It goes a long way to defining a common API for all libs, like:
read_temperature_celsius_device()
read_temperature_fahrenheit_device()
send_status_byte_device()
read_status_byte_device()
And, no this is not contrary to pin names as:
TC77_SIO and HD44780_EN, DS180_DATA
since pin names are used much more on a schematic level and only
declared once.
And yes, the NAME of the library itself should be:
lcd_hd44780_4.jal (as it already is, but there's nothing in the
Style Guide)
temperature_tc77.jal
co2_t6603.jal
If we agree, Seb should put this in the style guide too.
---
ir EE van Andel [EMAIL PROTECTED] http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---