[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: PAR0




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.

Regards,

Mahmut

> -----Original Message-----
> From: Michael Boeck [mailto:e9925077@xxxxxxx.at]
> Sent: Monday, 30 December 2002 4:51
> To: dev-etrax@xxxxxxx.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 
> axis-homepage,
> I get a lot of errors...
> 
> Please help.
> 
> Thanx
> Michael
> 
> 
> To: Kangning <engp1764@xxxxxxx.sg>
> Subject: Re: Parallel Port
> From: Bjorn Wesen <bjornw@xxxxxxx.com>
> Date: Sat, 22 Jun 2002 20:15:57 +0200 (CEST)
> Cc: dev-etrax <dev-etrax@xxxxxxx.com>
> In-reply-to: <000b01c21a07$0ba1c6c0$834713ac@xxxxxxx.sg>
> Sender: owner-dev-etrax@xxxxxxx.com
> 
> 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.
> 
> /BW
>