[go: up one dir, main page]

Skip to content

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

Notifications You must be signed in to change notification settings

zozo825117/rf_transfer

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published