I guess for core serial transfers it should be fairly simple to keep
things generic, ala:
int set_set(int baud, int parity, int bits, int stop) // 9600N81
int ser_xmt(char* buffer, int buflen)
int ser_rcv(char* buffer, int max, int timeout)
...if you have interrupts
Interrupt driven serial I/O may offer extra complications, but
generically it's just:
...I would think
And if it is a fully featured serial port, maybe some other pin level
You might find that a good place to look for more ideas is in a DOS
interrupt reference ("Ralf Brown's Interrupt List" springs to mind)
Beyond that you will need to decide what you will be doing with the
interface and what things a programmer would like to say to that
interface, such as:
... etc. and take ir from there.
>i meant, tihnking about keeping it generic from the start...
>On 22/03/06, Daniel Stenberg <email@example.com> wrote:
> > On Wed, 22 Mar 2006, Jonathan Gordon wrote:
> > > was there any discussion on how to make it more generic.. tihnking
> > > about usb-otg on the h300...
> > Since none of it is close to be supported yet, talking on making
> > things generic seems very premature to me.
> > I believe usb-otg is a lot more complex and potentially advanced than
> > supporting a mere serial port is.
> > Still, let's add support for it first and then see what we can do
> generic and
> > what not.
> > --
> > Daniel Stenberg -- http://www.rockbox.org/ -- http://daniel.haxx.se/
Received on Wed Mar 22 09:48:49 2006