[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Probably the easiest way to write a user-mode application would be using the
low level "parport" device driver. I don't think you can access the
individual registers directly. To do this, you should first enable this
driver in the kernel config. I think this setting was in the character
devices section. You should also create /dev/parport0 and /dev/parport1
files with major 99 and minor 0 and 1. You can do this from the Makefile in
devboard_lx/packages/devices/axis-2.4. To use this driver do a search on
google and it should return a programming manual.
> -----Original Message-----
> From: Michael Boeck [mailto:firstname.lastname@example.org]
> Sent: Monday, 30 December 2002 4:51
> To: email@example.com
> Subject: PAR0
> Hi !!!
> I want to programm a user-mode application to set/clear D0 to
> D7 from par0.
> I used the registers from svinto.h (eg. *R_PAR0_CTRL_DATA)
> but I only get
> error "parse error before 'u32' ". Do I need any more Headerfiles to
> include? Or is it only possible by programming a driver (see
> below) ??? If I
> include all header-files from the described lcd driver on the
> I get a lot of errors...
> Please help.
> To: Kangning <firstname.lastname@example.org>
> Subject: Re: Parallel Port
> From: Bjorn Wesen <email@example.com>
> Date: Sat, 22 Jun 2002 20:15:57 +0200 (CEST)
> Cc: dev-etrax <firstname.lastname@example.org>
> In-reply-to: <email@example.com>
> Sender: firstname.lastname@example.org
> On Sun, 23 Jun 2002, Kangning wrote:
> > *R_PAR0_CTRL_DATA = 0;
> > *R_PAR0_CTRL_DATA = 0xFF;
> > I also included the svinto.h file, where the R_PAR0_CTRL_DATA is
> > defined, but I got error "parse error before 'u32' " while make the
> > application. Can anyone tell me why this has happened and
> what I should
> I assume you're writing a device driver (and not a user-mode
> application) -
> if so, it should work fine as long as you include the
> appropriate linux/*.h
> files, among others the one which defines u32. Copy the
> includes from one of
> the other etrax drivers in arch/cris/drivers/*.c and see if it works.