Files
mixly3/boards/default/arduino_avr/examples/08-通信/03-SPI_Master_2.mix
2024-07-19 10:16:00 +08:00

1 line
4.1 KiB
XML

<xml version="Mixly 2.0 Beta11" board="Arduino AVR@Arduino/Genuino Uno" xmlns="http://www.w3.org/1999/xhtml"><block type="base_setup" id="+C=C_f=:;}dzKsuU;5r^" x="-1881" y="-42"><statement name="DO"><block type="variables_declare" id="S`/m{mCTCb?YRVPBwc{G"><field name="variables_type">global_variate</field><field name="VAR">MasterSend</field><field name="TYPE">int</field><value name="VALUE"><block type="math_number" id="w7q[7Tlt]kJJw~x_wVr4"><field name="NUM">0</field></block></value><next><block type="variables_declare" id="bCH%S9buPU_c[`%7Iphc"><field name="variables_type">global_variate</field><field name="VAR">MasteReceive</field><field name="TYPE">int</field><value name="VALUE"><block type="math_number" id="caRH.?mG#@W..0g557+l"><field name="NUM">0</field></block></value><next><block type="spi_begin_master" id="RusTRkC-k9IkLP?fM;9W"><value name="spi_slave_pin"><shadow type="pins_digital" id="8.:Cr-[#mP-QsegSk/[c"><field name="PIN">10</field></shadow></value><next><block type="serial_begin" id="`{b-UI{oklK*x?1~ajHi"><field name="serial_select">Serial</field><value name="CONTENT"><shadow type="math_number" id="!uz+[L^=(|PN;rY3F%)9"><field name="NUM">115200</field></shadow></value></block></next></block></next></block></next></block></statement></block><block type="controls_if" id="BLDH5DN;T7NzT7PL(Dm5" x="-1888" y="151"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="inout_digital_read2" id="Dh%[E1lLC/TbQw#3|:92"><value name="PIN"><shadow type="pins_digital" id="af%kvJh1K8zhr9)LLu6]"><field name="PIN">2</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="XPD@hza*z/xSDTYW8Md?"><field name="VAR">MasterSend</field><value name="VALUE"><block type="math_number" id="iyP1pJxQ~L2yLp47t2C#"><field name="NUM">1</field></block></value></block></statement><statement name="ELSE"><block type="variables_set" id="mvV/Tri+-^T*B-@5{BA,"><field name="VAR">MasterSend</field><value name="VALUE"><block type="math_number" id="C(01`0g{DL;QRHpp6*%d"><field name="NUM">0</field></block></value></block></statement><next><block type="spi_transfer_Init" id="Uq_giHZB62C6UY`GJNA."><value name="slave_pin"><shadow type="pins_digital" id=")t5$Dip8B$u;hOx=+t[0"><field name="PIN">10</field></shadow></value><statement name="transfer_data"><block type="variables_set" id="bM#,0=C9hw+#sdn{4ln%"><field name="VAR">MasteReceive</field><value name="VALUE"><block type="spi_transfer_2" id="#3d=gf?(#RncG:IV3ODJ"><value name="transfer_data"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text_char" id="9P203:As}j;)+ETwD3d2"><field name="TEXT">A</field></shadow><block type="variables_get" id="{}Y66[kR[B{@^A?3:O^y"><field name="VAR">MasterSend</field></block></value></block></value></block></statement><next><block type="controls_if" id="|A)K/C0=LEmMm^Xb%C_f"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="?W)(c6AH{?r3k]6Xw3Tp"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="b?b[~UI;qUw--|Yyp-li"><field name="VAR">MasteReceive</field></block></value><value name="B"><block type="math_number" id="?MVmy0Pz[W[jV/(+M}y9"><field name="NUM">1</field></block></value></block></value><statement name="DO0"><block type="inout_digital_write2" id="mr9=5:q#w@$$=5R-r)hi"><value name="PIN"><shadow type="pins_digital" id="z;$aHL`b_0YKTAl(9J5I"><field name="PIN">3</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="Q|r{Gm^:YIhwjYjD?]$Z"><field name="BOOL">HIGH</field></shadow></value></block></statement><statement name="ELSE"><block type="inout_digital_write2" id="2f]X2ju--6TLbmxF#`A@"><value name="PIN"><shadow type="pins_digital" id=");WtjlI#Ys@%8`LACCtk"><field name="PIN">3</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="DVR$B?che.gg+?e,uNXH"><field name="BOOL">LOW</field></shadow></value></block></statement><next><block type="controls_delay" id=".U,gfmq$bpFkn8UTf1fh"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="hG0c%sBpz@OT9/(jjE@C"><field name="NUM">1000</field></shadow></value></block></next></block></next></block></next></block></xml>