Hi,
  All,
        I had downloaded "rt_com-0.5.4" driver from Source
Forge. But the problem is it's not working correctly.
My system is like this.

1. RTLinux V3.0 [ Installed from RTLinux CD ]
2. Pentium II, 433MHZ. 

To successfully compile the rt_com I had made certain
changes into various files as follows.
Please take a look at it.

-----------------------------------------------------------------------

-----------------------------------
1. Makefile.

SYSTEM                  = RTAI 
--> changed to 
SYSTEM                  = RTLINUX_V3

---> added
include ./rtl.mk -->which is autogenerated for
RTLINUX_V3. 

-->commented following line.
#CFLAGS                 += -I/usr/include/rtlinux -O2 

2. rt_com.c

---->commented rt_irq.h  see below...

#if defined RTAI
#  include <rtai.h>
#elif defined RTLINUX_V1
#  include <rtl_sync.h>
#  include <rt_irq.h>
#  include <rt_time.h>
#else
#  include <rtl.h>
#  include <rtl_core.h>
#  include <rtl_sync.h>
#  include <rtl_time.h>

//!! THIS FILE IS NOT REQUIRED AS free_RTirq()
replaced by rtl_free_irq() from 
//!! init_module() function. 

/* #  include <arch/rt_irq.h> */

#endif

--->Changed last "used"  value  to "1" so that I can
use standard "rt_com"

/** Default: mode=0 - DSR needed on TX, no hw flow
control
 *           used=0 - port and irq setting by
rt_com_set_param. If you 

want to work like
 *                    a standard rt_com you can set
used=1. */
struct rt_com_struct rt_com_table[ RT_COM_CNT ] =
{
     /* "used" is now "1" */    
    { 0, RT_COM_BASE_BAUD, 0x3f8, 4,
RT_COM_STD_COM_FLAG, rt_com0_isr, 

0, 1 },  /* ttyS0 - COM1 */
    { 0, RT_COM_BASE_BAUD, 0x2f8, 3,
RT_COM_STD_COM_FLAG, rt_com1_isr, 

0, 1 }   /* ttyS1 - COM2 */
};


3. rt_comP.h

//!! removed RTLINUX_V2 flag. Otherwise it gives
compilation warning saying
//!! "implicitly difined functions xyz()"

#elif defined RTLINUX_V2 
#  define rt_com_irq_off( state )        
rtl_critical( state )
#  define rt_com_irq_on(state)           
rtl_end_critical( state )
#  define rt_com_request_irq( irq, isr ) 
rtl_request_global_irq( irq, 

isr ); rtl_hard_enable_irq( irq )
#  define rt_com_free_irq( irq )         
rtl_free_global_irq( irq )
#endif

//!! So now code look like as follows

#else 
#  define rt_com_irq_off( state )        
rtl_critical( state )
#  define rt_com_irq_on(state)           
rtl_end_critical( state )
#  define rt_com_request_irq( irq, isr ) 
rtl_request_global_irq( irq, 

isr ); rtl_hard_enable_irq( irq )
#  define rt_com_free_irq( irq )         
rtl_free_global_irq( irq )
#endif

-----------------------------------------------------------------------

-----------------------------------

1. Now rt_com is successfully compiled and then I had
disabled "ttyS0" 

and "ttyS1" using "setserial" command.
2. "insmod rt_com.o" successfully loaded.
3. Now I had tried to "insmod testcom.o" which doesn't
works..Why??? I 

don't know yet...

Curious thing is "rt_com" driver supplied with
RTLINUX_v3 distribution 

works perfact with "testcom" example.

But new 0.5.4 driver doesn't work....Has anybody tried
0.5.4 driver on RTLINUX_V3?

So please can you give some ideas...

Regards,
Trilok Soni.



__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to