Hi Matt,

On 02/21/12 11:22 am, mattschinkel wrote:
Hey Guys, I was thinking about making a library for POSTINC1&
POSTINC2. Let me know what you think. Would it be a useful lib?

If you think it is useful then go for it! I mean don't wait until I think it could be useful!

These are quite easy to use as they are, but there are a few reasons
for a library:
1. Naming can be improved
2. Can write to FSR1L/FSR1H with a word variable instead having to
make a word variable in your code. although I wonder if this could be
done in the device files.

I think most device files with (16-bits) FSR already have a word declaration for FSR1 and FSR2. I'll have to check. But even when not it can probably be added easily.

3. It will be more understandable to users with naming and since there
are notes in a library
4. May be able to support word, dword and byte*x variables through a
lib.

However, I think 16F pics do not have POSTINC and will either not be
able to use the library, or the library can support a fake POSTINC for
reading/writing arrays. Which is best?

Libs using this could use if defined() to see if the PIC supports it,
otherwise use other code.

Do the easy/obvious first and leave the refinements for later.


As you may know, POSTINC1 is used in the current USB libs.

Instead of set_mem1_next pesudo variables, can they be made in the
device files? A library would not be needed except for points 3&  4
above.

var volatile byte   FSR1L shared at 0xFE1
var volatile byte   FSR1H shared at 0xFE2
var volatile word FSR1 shared at 0xFE1
var volatile alias set_mem1_next is FSR1

I'll have to read more about POSTINC to fully understand its purpose and usefulness and if should be part of (and what exactly will have to be added to) the device files, but I think it won't be a problem.

Regards, Rob.



--
R. Hamerling, Netherlands --- http://www.robh.nl

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