Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#149110 - 18/03/2003 17:07 Programmatic serial flow control
V99
member

Registered: 12/01/2002
Posts: 192
Loc: Phoenix, AZ
The developer info says that RTS/CTS isn't implemented in the serial driver.. the serial VFD I'm using is occasionally slow and can't keep up with data being sent, so I need a way to read it's "busy" line and not send any more data until it goes low again. Right now the busy line is connected to the Empeg CTS, which the player uses for display dimming, so I can see it flipping on and off.

How do I check the status of the serial control lines from a userland app?

Top
#149111 - 18/03/2003 18:30 Re: Programmatic serial flow control [Re: V99]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I could be wrong, but I think that they're simply not attached -- that there's no way to get to them. Can you use software flow control (Ctrl-S/Ctrl-Q) instead?
_________________________
Bitt Faulk

Top
#149112 - 18/03/2003 21:13 Re: Programmatic serial flow control [Re: wfaulk]
V99
member

Registered: 12/01/2002
Posts: 192
Loc: Phoenix, AZ
At least some of them are attached; CTS is used for dimmer sense, DCD for mute.. it would seem logical to assume that RTS his other friends are connected too. I don't actually use the mute line though so hijacking it would be fine.

empegcar.h defines some useful looking constants:
#define EMPEG_SERIALDSR      (GPIO_GPIO21) /* IN  Serial DSR                 */

#define EMPEG_SERIALCTS (GPIO_GPIO22) /* IN Serial CTS */
#define EMPEG_SERIALDTR (GPIO_GPIO23) /* OUT Serial DTS (also LED) */
and empeg_power.c has some code that would seem to work:
	unsigned int gplr=GPLR;

...
if (!(gplr&EMPEG_SERIALDCD)) bitset|=EMPEG_POWER_FLAG_EXTMUTE; /* Tel mute */
, but doing anything with GPLR seems to cause a segfault (which dumps to the display, and half the chars are dropped because it's not observing the CTS line ). Maybe it's only accessible in kernel space?

Software flow control would require the cooperation of the display firmware, which isn't there.

Top
#149113 - 18/03/2003 21:20 Re: Programmatic serial flow control [Re: V99]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
You're trying to directly access the hardware from userspace which you can't do. You have change the kernel to support it I'm afraid.

- Trevor

Top
#149114 - 18/03/2003 21:23 Re: Programmatic serial flow control [Re: V99]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14483
Loc: Canada
The one you are interested in may already be in /proc/empeg_power

-ml

Top