From: Martin H. <ma...@he...> - 2004-01-31 20:20:50
|
Hi Michael, Michael Reinelt wrote: > (Martin, are you listening?) I am :-) > Martin's special gpio-parport-soekris-whatever-it-is-called-today > implementation that is capable of using 4 bits as input and 4 for output > can be handled exactly this way! > > So the user has to specify a "Model" in the config, if he specifies > "gpio" (or however you want to call it, Martin), we suppose the user > knows what he's doing, and allow 4-bit-busyflag. With all other models, > we permit it. > > Now that's what I call a clean solution! Sounds like a good idea to me. Right now, I don't really have a clue about how that would be implemented cleanly (since everything would be shared except the init-function (where the driver doesn't bail out with an error message, if 4-bit-mode and busy-flag is requested) and the actual "query_busy_flag" function itself. In both functions, the code that differs is only a couple of lines (so duplicating all the other code would not be desirable). But as I said - I like the idea a lot (even if I don't share your view that the user knows what [s]he's doing :-)) Martin |