Hi William, I'd say this 30 lines of code are the init function of your library, and this init function might take a few parameters or there are some constants you need to define before you include the can libarary. But I expect this is too simple and you will explain in more detail why ;)
Joep 2010/4/19 William <[email protected]>: > Greetings, > > I'm looking for a better way to handle initialization, in this case, > for 18F devices that have built-in CAN. There are a lot of registers > to initialize - takes about 30 lines of JAL, including comment lines. > > But I have (hopefully) the same 30 lines in several different > applications (most are in the samples directory: 18f_can*). As I > learn more about the CANbus, and about the picmicro support for > CANbus, I want a more convenient way to update all of the applications > to use the same setup -- in this specific example, they all need to > interoperate on the same CANbus at 125K bps, and have the same CAN-ID > filters, etc. > > I considered putting a 'library' in the samples directory, but I don't > know if that is allowed or is the best place. > > To recap-- if I have several different applications that all need to > set up a peripheral in the same way, but it takes quite a few JAL > statements to do this, how do I place these statements in a single > "include" file? > > Any suggestions how to do this, and where to put in the SVN? > > If the answer is: "No, you can't", that is OK. I just wanted to ask. > > Thank you, > > William > > -- > 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. > > -- 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.
