07-06-2010 02:27 AM
Hello Everyone I am trying to send data to ttyUSB0 by using some system calls.
here is the code
#include<fcntl.h>
#include<stdlib.h>
#include<sys/stat.h>
#include<unistd.h>
#include<stdio.h>
#include <termios.h>
#include <sys/signal.h>
#include <sys/types.h>
#include <string.h>
int main(void){
int fd1;
fd1=open("/dev/ttyUSB0",O_RDWR);
printf(" the file discription value is = %d \n\r",fd1);
char buf[40]="Computer System Architecture Group";// this is the string of length 34
write(fd1,buf,34);
return 1;
}
now this is throwing data onto ttyUSB0 . Now in FPGA there is one application running
which uses
XUartLite_Recv(&uart,buff,34 );
but when i tried to print this " buff " . I am getng unreadable values.
Can any one please help me.
Thank you
Regards,
Abhinav Pundir
Email ID : abhinavpundir@ymail.com
07-12-2010 03:45 PM
Finally I waz able to send data from the Uart port(ttyUSB0) to the board.
But nobody helped me.
So strange??
abhinavpundir@ymail.com