zoukankan      html  css  js  c++  java
  • Linux command stty

    Linux command stty

    reference: https://blog.csdn.net/lqxandroid2012/article/details/78929506

    Purpose

           Learning linux command stty for get/set serial uart speed 

     

    Eevironment

           Ubuntu 16.04 terminal

     

    Procdeure

           example get uart speed:

    root@IoTP:~# stty -F /dev/ttyUSB2 -a 
    speed 9600 baud; rows 0; columns 0; line = 0;
    intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^A; eol = <undef>;
    eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
    werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
    -parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
    -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
    -iuclc -ixany -imaxbel -iutf8
    -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
    isig -icanon iexten -echo -echoe echok -echonl -noflsh -xcase -tostop -echoprt
    echoctl echoke -flusho -extproc

      example set uart speed:

    stty -F /dev/ttyS0 speed 115200 cs8 -parenb -cstopb  -echo
    解释:通过stty设置/dev/ttyS0串口, 波特率为115200 ,数据位cs8,奇偶校验位-parenb,停止位-cstopb,同时-echo禁止终端回显。
  • 相关阅读:
    B-Suffix Array
    1 or 2
    Boundary
    Fake Maxpooling
    Cover the Tree
    Omkar and Circle
    20.5.31
    Yet Another Yet Another Task
    Codeforces Round #373 (Div. 2)E. Sasha and Array +线段树+矩阵快速幂
    2018 Multi-University Training Contest 2(Naive Operations ) hdu6315
  • 原文地址:https://www.cnblogs.com/lianghong881018/p/10518283.html
Copyright © 2011-2022 走看看