2008/12/9, Sebastien Lelong <[EMAIL PROTECTED]>: > > > Good to see some life back on this project! Today I adapted > > i2c_hw_slave to work with jallib and created a timer-0 lib (for fixed > > interval ISR). Not yet ready to add to jallib but it is in the > > process! > > Great ! Is this a state machine implementation ? I've implemented a > i2c hw slave, and I'm very curious to know how you'd deal with that as > a library. It is. I don't have it at hand but will mail it to you. The interface is not as clean as it should and has one limitation: you always need to read back at least one byte to get the previous write processed.
> > Only in unvalidated/include/peripheral/i2c: i2c_level1.jal > > Should be added. > > It is better to use this level1 routine then the level0 routines it > > calls. How can we notify users of this? Maybe we should not add the > > level0-based examples. > > Then just put level1 lib in validated (I mean, keeping validated may > still be useful). > BTW, what are level 0 and level 1? Level0 are the primitives - read, write, start, stop. Level1 goes on top of this, allowing you to execute a full write/read cycle in one call. It uses level0 to execute. I have test programs for level0, but my suggestion is not to generate examples from them. Only create examples from the level1 test since this is the best way in most cases to use the i2c libs. > Question: when I have time to write my GP2D02 lib, should I add the > test as a test file ? Or is it too a specific part ? I mean, should we > only consider using board/tests => samples for core lib, or for every > lib ? I think you started out wrong ;) If you create a lib, you also create a program to test the lib. And often, you use a display for testing. So if you have a board file ready with the lcd pins and processor setup the right way, it is less work to create a real testfile to test the new lib in stead of whole program to test the lib... If the GP2D02 works on one 16F chip, it probably works on all of them. So creating examples for each of them does not look like much added value. But it does not cost anything (see above) and it might not be so obvious the lib works on 18F chips... Joep --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
