CAN
<h2>CAN的使用</h2>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=67184c529e5c83e946263539b0a0b808&amp;file=file.png" alt="" />
(注:效果图为CAN接口)</p>
<h3>一、接口定义</h3>
<table>
<thead>
<tr>
<th>CAN0</th>
<th>L1</th>
<th>H1</th>
<th>G1</th>
</tr>
</thead>
<tbody>
<tr>
<td>CAN1</td>
<td>L2</td>
<td>H2</td>
<td>G2</td>
</tr>
</tbody>
</table>
<h3>二、CAN口发送接收命令介绍</h3>
<p>1.设置CAN口比特率
CAN0:</p>
<pre><code class="language-shell">ip link set can0 down
ip link set can0 type can bitrate 500000
ip link set can0 up
cansend can0 123#1122334455667788 # can0 发
candump can0 # can0 收</code></pre>
<p>CAN1</p>
<pre><code class="language-shell">ip link set can1 down
ip link set can1 type can bitrate 500000
ip link set can1 up
cansend can1 123#1122334455667788 # can1 发
candump can1 # can1 收</code></pre>