Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12603 Discussions

uClinux: Use the alternative touch screen driver

Altera_Forum
Honored Contributor II
1,795 Views

Hi, 

 

I tried to use an "elo serial touch" driver (enabled in the uClinux kernel config) for an external display, connected to my Nios II Embedded Evaluation Kit. 

Unfortunately I'm new to the whole uClinux / NIOS Processor stuff, and wanted to know if someone else got other touch screen to run / has experience with this drivers. 

 

On the first attempt i tried to receive some signals with the from the touch screen (executing "event_test" application testing the /dev/ttyS0) but got no success. 

 

uClinux-dist configuration: 

Device Driver --> 

Character Driver --> 

--> serial ports --> Altera UART support 

Input Device Driver --> 

--> Touchscreen --> Elo serial touchscreen 

--> Hardware I/O --> serial discipline 

 

Library Config.: 

--> tslib 

MicroWin 

--> usual configuration  

--> use tslib 

 

 

I did not modify anything else. 

Would be nice if somebody could help me. 

 

Appreciate, 

J.Z.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
1,003 Views

Please check wiki at,  

 

http://wiki.archlinux.org/index.php/attaching_serial_input_devices_to_the_kernel_input_system 

 

event test is used to test /dev/input/event0...etc, but not /dev/ttyS0. 

 

Did you config "Serial port line discipline"? 

 

Did you check if the uart can talk with the serial touch screen? 

 

Did you config "event interface"? Did you try "event-debug"? 

 

- Hippo
0 Kudos
Altera_Forum
Honored Contributor II
1,003 Views

I added "inputattach" to uClinux-dist.git. Please pull. 

 

- Hippo
0 Kudos
Altera_Forum
Honored Contributor II
1,003 Views

HI,  

thank you for your fast reply and effort. Got the inputattach app. 

 

I enabled the "Serial port line discipline" option in the kernel config. As well as the "Event interface" 

 

Altera UART Support is enabled and is set to 9600 default Baud rate, as it's the default rate of the touch screen controller. 

 

The app "setserial" show the following information after booting uClinux: 

 

... 

ttyJ0 at MMIO 0x8001410 (irq = 7) is a Altera JTAG UART 

console [ttyJ0] enabled 

ttyS0 at MMIO 0x8001340 (irq = 6) is a Altera UART 

... 

 

/> setserial -a /dev/ttyS0 

/dev/ttyS0, Line 0, UART: undefined, Port: 0x0000, IRQ: 6 

Baud_base: 3125000, close_delay: 50, divisor: 0 

closing_wait: 3000 

Flags: spd_normal 

 

Seems the uart and port definition is missed and Baud rate is not the default one. 

I was able to set the Baud rate to 9600 with setserial but was not able to change uart. 

 

How do I check whether the board talks with the touch screen? (I'm new to the whole rs232 environment.) 

The display still does not react. 

 

Appreciate, 

J.Z.
0 Kudos
Altera_Forum
Honored Contributor II
1,003 Views

Hi, 

 

I'm having a hard time to communicate with the external touch controller. 

I specified the app "inputattach" with proper parameters. 

Driver for the touch controller (Elo) was recognized (Inputattach running in background). 

But testing event0 (assigned to "elo touch" driver) has no result. 

 

I also tried the console device via serial port (Terminal emulator: HyperTerminal) which worked out fine. 

 

As earlier mentioned "setserial" brings still the following report: 

 

/> setserial -a /dev/ttyS0 

/dev/ttyS0, Line 0, UART: undefined, Port: 0x0000, IRQ: 6 

Baud_base: 3125000, close_delay: 50, divisor: 0 

closing_wait: 3000 

Flags: spd_normal 

 

Main Configuration of the kernel: 

 

+ Device Driver -> Char. devices -> Virtual terminal 

+ Device Driver -> Input device supp. -> Event interface 

+ Device Driver -> Input device supp. -> Event debugging 

+ Device Driver -> Input device supp. -> Touchscreens -> Elo serial touch 

+ Device Driver -> Input device supp. -> Hardware I/O ports Serial port line discipline enabled 

+ Device Driver -> Char. devices -> Serial drivers -> Altera UART support enabled (default baudrate 9600), Altera JTAG UART support (+ console support)) 

(mouse and keyboard not included yet) 

 

Am I missing some options? 

 

PS: I also tried to activate the serial drivers "8250/16550 and compatible serial support" (Device drivers -> Char. devices -> serial drivers) 

but an error appears during compilation stating: 

 

../nios2-linux/linux-2.6/drivers/serial/8250c:104:24: asm/serial.h: no such file or directory 

..(compilation aborted) 

 

I would appreciate if someone could help me on that problem. 

 

Thank you in advance! 

D.
0 Kudos
Reply