I'm trying to comunicate via serial port in a RT module.
But looking at the TX bit with the oscilloscope there is no signal.
This is my source:
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/cons.h>
#include <rtl_sched.h>
#include <rtl_fifo.h>
#include <rt_com.h>
#include <rt_comP.h>
#include "common.h"
RT_TASK mytask;
void mainloop(int fifodesc){
int data=0;
while(1) {
data++;
rtf_put(1, (char *) &data, sizeof(data));
rt_com_write(0,"prova",5);
rt_task_wait();
}
}
int init_module(void)
{
RTIME now= rt_get_time();
rtf_create(1,3000);
rt_com_setup(0,9600,0,1,8);
rt_task_init(&mytask, mainloop, 1, 3000, 4);
rt_task_make_periodic(&mytask, now+1000, 25000);
return 0;
}
void cleanup_module(void)
{
rt_task_delete(&mytask);
rtf_destroy(1);
}
The module does work, because I can read from the fifo all data writen, but
I can't read anything from the serial port.
Ciao Giorgio.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.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/~rtlinux/