>
> > So, do you mean baudrate could be set as a default or not ? I strongly
> > disagree to put it as default, it doesn't make sens IMO.
> well, 1200 makes more sense then error to me. But I do prefere 115200
> as a default. (but to be honest, a default that also works with the
> 8mhz oscillator of 16f88 would be betrer and for skipping bertlib
> users, bert his default would be best, so I suggest we use that one).
>
>
I disagree, I prefer an error than having a baudrate defined somewhere in a
file, I'll have to regularly open to double-check the value. Again, what's
the purpose ? Doing it the way Bert did, or make it jallib simpler to use ?
Is having to define the baudrate too complicated ? It's not even related to
the hardware, the baudrate can change in any *projects*. This is a project's
default, not a jallib's default. You may say "so is the watchdog". Yes, but
that's an advanced feature. We could debate about what "advanced" means, but
sure I had to set many, many different baudrates (and was highly frustrated
to have this defined in a lib, by the time I was using starterpack) in my
project, also sure I've never used watchdog (the name itself scares me).

jallib is also about readable, maintainable code.

"""
include 16f88
include ez

const word serial_hw_baudrate = 115_200
include serial_hardware
"""

Reading this, you just know what this is about, and which baudrate you'll
have to use on this other side. A bit off topic, but maybe a good solution
is not making this baudrate as constant, but as a variable. I think this is
possible, except when checking values like error deviation, etc...

On the other side, ADC_RSOURCE can be put in these defaults (it actually
defaults to a value I can't remember within the adc.jal lib, but that's an
example). Changing this value won't change the way the lib works, it's just
about optimization. We default this to the highest possible value, then let
users optimize it if needed.

Should be put in defaults all those constants which are about optimization,
and rarely used features.

Maybe we could provide:


  - ez_defaults.jal : declare constants
  - ez_pragmas.jal : get rid of watchdog, etc...
  - ez.jal : as a glue, the one being used at first

so maybe users could select which EZ part then we want.


Cheers,
Seb
-- 
Sébastien Lelong
http://www.sirloon.net
http://sirbot.org

--~--~---------~--~----~------------~-------~--~----~
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