Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Ipod 5G serial

Re: Ipod 5G serial

From: Bluechip <csbluechip_at_gmail.com>
Date: 2006-03-22

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 <daniel@rockbox.org> 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/
> >
Received on Wed Mar 22 09:48:49 2006


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa