mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-17 19:57:57 -06:00
Deploying to gh-pages from @ Klipper3d/klipper@f7567a0db9 🚀
This commit is contained in:
parent
396e728f2d
commit
8dff4c78b5
293 changed files with 18737 additions and 1567 deletions
|
@ -622,8 +622,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="Axis_Twist_Compensation.md" class="md-nav__link">
|
||||
None
|
||||
<a href="Axis_Twist_Compensation.html" class="md-nav__link">
|
||||
Axis Twist Compensation
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -1247,8 +1247,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="Bootloader_Entry.md" class="md-nav__link">
|
||||
None
|
||||
<a href="Bootloader_Entry.html" class="md-nav__link">
|
||||
Bootloader Entry
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -1561,21 +1561,40 @@ gpiochip1 - 8 lines:
|
|||
dtoverlay=pwm,pin=12,func=4
|
||||
</code></pre></div>
|
||||
|
||||
<p>此示例仅启用 PWM0 并将其路由到 gpio12。如果需要同时启用两个 PWM 通道,则可以使用 <code>pwm-2chan</code>。</p>
|
||||
<p>overlay 在启动时不会在 sysfs 上暴露出 PWM 线路,需要通过echo将 PWM 通道的编号导出到 <code>/sys/class/pwm/pwmchip0/export</code>:</p>
|
||||
<div class="highlight"><pre><span></span><code>echo 0 > /sys/class/pwm/pwmchip0/export
|
||||
<p>This example enables only PWM0 and routes it to gpio12. If both PWM channels need to be enabled you can use <code>pwm-2chan</code>:</p>
|
||||
<div class="highlight"><pre><span></span><code># Enable pwmchip sysfs interface
|
||||
dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4
|
||||
</code></pre></div>
|
||||
|
||||
<p>This example additionally enables PWM1 and routes it to gpio13.</p>
|
||||
<p>The overlay does not expose the pwm line on sysfs on boot and needs to be exported by echo'ing the number of the pwm channel to <code>/sys/class/pwm/pwmchip0/export</code>. This will create device <code>/sys/class/pwm/pwmchip0/pwm0</code> in the filesystem. The easiest way to do this is by adding this to <code>/etc/rc.local</code> before the <code>exit 0</code> line:</p>
|
||||
<div class="highlight"><pre><span></span><code># Enable pwmchip sysfs interface
|
||||
echo 0 > /sys/class/pwm/pwmchip0/export
|
||||
</code></pre></div>
|
||||
|
||||
<p>When using both PWM channels, the number of the second channel needs to be echo'd as well:</p>
|
||||
<div class="highlight"><pre><span></span><code># Enable pwmchip sysfs interface
|
||||
echo 0 > /sys/class/pwm/pwmchip0/export
|
||||
echo 1 > /sys/class/pwm/pwmchip0/export
|
||||
</code></pre></div>
|
||||
|
||||
<p>这将在文件系统中创建设备<code>/sys/class/pwm/kwmchip0/pwm0</code>。最简单的方法是在<code>/etc/rc.local</code>的<code>exit 0</code>行之前添加这行。</p>
|
||||
<p>有了 sysfs,现在可以通过将以下配置添加到 <code>printer.cfg</code> 来使用 PWM 通道:</p>
|
||||
<div class="highlight"><pre><span></span><code>[output_pin caselight]
|
||||
pin: host:pwmchip0/pwm0
|
||||
pwm: True
|
||||
hardware_pwm: True
|
||||
cycle_time: 0.000001
|
||||
|
||||
[output_pin beeper]
|
||||
pin: host:pwmchip0/pwm1
|
||||
pwm: True
|
||||
hardware_pwm: True
|
||||
value: 0
|
||||
shutdown_value: 0
|
||||
cycle_time: 0.0005
|
||||
</code></pre></div>
|
||||
|
||||
<p>这将为树莓派上的 gpio12 引脚添加硬件 PWM 控制(因为overlay被配置为将 pwm0 路由到 pin=12)。</p>
|
||||
<p>This will add hardware pwm control to gpio12 and gpio13 on the Pi (because the overlay was configured to route pwm0 to pin=12 and pwm1 to pin=13).</p>
|
||||
<p>PWM0 可以被路由到 gpio12 和 gpio18,PWM1 可以被路由到 gpio13 和 gpio19:</p>
|
||||
<table>
|
||||
<thead>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue