/rf_transfer

spi设备读写,并用socat创建虚拟窗口,实现进程间的通讯

Primary LanguageC

rf_transfer

liunx app

spi设备读写,并用socat创建虚拟窗口,实现进程间的通讯

Features

  • spi设备读写
  • socat创建虚拟窗口
  • pts 串口映射
  • thread

TODO

  • socket机制

Project Organization

build

  • 交叉编译器 CC=arm-openwrt-linux-gnueabi-gcc

Useage

  if(socat_declare()==1){
    sprintf(str_buf,"ln -s /dev/pts/%d /dev/ttyGW0",pts_num0);
    //printf("system (%s)\n", str_buf);
    // system("ln -s /dev/pts/3 /dev/ttyGW0");
    system( str_buf);
    sprintf(str_buf,"ln -s /dev/pts/%d /dev/ttyGW1",pts_num1);
    //printf("system (%s)\n", str_buf);
    // system("ln -s /dev/pts/4 /dev/ttyGW1");
    system( str_buf);
    //system("rm string.log");    
  }
  else{
    printf("open dev error !\n");
    exit(0);
  }

创建了两个 pts虚拟串口,并关联的自定义路径

Reference