Kirk Wallace wrote: >On Mon, 2008-06-09 at 21:17 -0700, Alan Condit wrote: > > >>[snip] >>Actually it wasn't the first try, I had tried, >>loadrt hal_parport cfg="0xec00 0x378" and it hadn't worked so I >>changed it to >>loadrt hal_parport cfg="0xec00" and it worked. >> >>I had tried the whole list of ports on both connectors without any >>luck when I had left the 0x378 in the config statement as the second >>port (without adding the necessary reads and writes). >> >>Can anyone explain why that won't work? And what does the "1" or >>"-1" after the read or write command mean? >> >>Alan >>--- >> >> > >It may be how the loadrt hal_parport cfg="X Y Z" assigns port numbers. I >thought it might be parport.0 goes to the first address in the list, but >apparently not. Maybe its the lowest address gets parport.0 and the next >lowest address, parport.1, and so on. That's how I have used it so far, >but I have always had my addresses in increasing order so I couldn't >tell the difference. > > The first port listed is parport.0, the second parport.1, etc. You can try using underscores instead of spaces. I seem to remember issues with the kernel screwing up parameters with spaces in them.
>The 1 and -1 are a little funky. A 1 indicates that the function in this >line should be executed first. A -1 means the line should come last. I >believe you can use other numbers, like a -2 means the line gets >executed second to last. I don't know what happens if you have more than >one line with 1 or -1. At first I assumed the lines where executed in >line order, but then I realized that there were some config files that >had function call outs in more than one file, so the function execution >order gets a little fuzzy. > > It all has to do with the order you add functions, and what the function list looks like when you add new ones. The default is to stick new functions at the end of the list, the equivalent of "-1". Here's what happens with each line of your (Alan's) load sequence: # this line adds parport.0.read as step 1 addf parport.0.read base-thread # this line adds parport.1.read as step 1, pushing parport.0 to step 2 addf parport.1.read base-thread 1 # add stepgen to the end, as number 3 addf stepgen.make-pulses base-thread # add parport.0.write to the end of the list (also the default with no number specified) addf parport.0.write base-thread -1 # add parport.1.write to the end of the list (also the default with no number specified) addf parport.1.write base-thread -1 So the order after all that is slightly surprising: parport.1.read parport.0.read stepgen.make-pulses parport.0.write parport.1.write Hope this helps - Steve ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users