Hi,

Just jumping on this subject about having multiple files/libs, joined to
provide a single functionality. Example: ADC lib. One important aspect is to
be able to declare the pins involved in ADC (namely AN0, AN1, etc...). This
is what's done in MCC18 adc.h header file. So:

  1. either we put all those declaration in the same adc.jal file,
  2. either we put it in a separate file, say adc_pins.jal.

I prefer option 2.:if something is missing in our adc_pins.jal file, users
can still create their own, and play with -s compiler option so their own
file is taken first. It has less impact on his code: when we fix the
problem, he just remove its custom lib. More, but specific to this case,
this list of pin declaration is huge, it has impact on the readability on
the lib itself, on the core.

On a more general point of view, this is about overuling, again :) Since we
don't have this, one possibility is to split into different files, each
having their own "responsabilities", nothing more, nothing less. A "glue"
file, like pwm_hardware.jal, makes the whole transparent for users.

Maybe we should consider adding this separate layer for register names, a
layer between the peripheral itself, and the device files.

Just some thoughts...


Cheers,
Seb




I would prefer to change the libraries:
> either have separate libraries for the midrange and 18Fs, or a single
> library with conditional compiles based on the TARGET_CPU constant. The
> libraries are not so complicated so a single library looks viable.
>
> There is an argument for separate libraries: the midrange PICs have only
> 1 SSP module, many 18Fs have 2 SSP modules.  A new library for the 18Fs
> might start with support for the first SSP module by copying the
> mcurrent library and changing the register names. Later it could be be
> extended with support for 2 SSP modules without effect on the midrange
> library.
>
> There is also an argument against separate libraries: although JalV2
> doesn't support (yet) the extended midrange PICS (16F18xx/19xx), these
> may have more than 1 SSP module (looks like the 16F1827 has).
>
>

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