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)
int     ser_poll(void)

Maybe some:
int     ser_enable(void)
int     ser_disable(void)
...if you have interrupts

Interrupt driven serial I/O may offer extra complications, but generically it's just:
void    ser_int(void)
...I would think

And if it is a fully featured serial port, maybe some other pin level functions.

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:
int     usb_handshake(...)
int     usb_sendfile(...)
... etc. and take ir from there.

Good Luck,

BC

i meant, tihnking about keeping it generic from the start...
On 22/03/06, Daniel Stenberg <[EMAIL PROTECTED]> 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 non-existing
> 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/
>

Reply via email to