From dbf9adf0d866a568a209e068b5ffb7d2adad7eb7 Mon Sep 17 00:00:00 2001 From: Villivateur Von Date: Sat, 22 Jan 2022 11:51:35 +0800 Subject: [PATCH] translate 1wire, gpclk, jtag, pwm, sdio to zh --- src/zh/template/index.md | 7 ++++--- src/zh/translate/3v3-power.md | 4 ++-- src/zh/translate/5v-power.md | 4 ++-- src/zh/translate/ground.md | 4 ++-- src/zh/translate/iface-1wire.md | 24 +++++++++++------------- src/zh/translate/iface-gpclk.md | 20 ++++++++++---------- src/zh/translate/iface-jtag.md | 12 ++++++------ src/zh/translate/iface-pcm.md | 2 +- src/zh/translate/iface-pwm.md | 6 +++--- src/zh/translate/iface-sd.md | 8 ++++---- 10 files changed, 45 insertions(+), 46 deletions(-) diff --git a/src/zh/template/index.md b/src/zh/template/index.md index 12c3deb..cfc4b5f 100644 --- a/src/zh/template/index.md +++ b/src/zh/template/index.md @@ -6,6 +6,8 @@ 本站从 [Pinout.xyz](https://pinout.xyz) 翻译而来,部分翻译工作仍在进行中,敬请期待! +有任何问题可以直接邮件联系 v@vvzero.com ,谢谢! + ## 支持我们 如果你喜欢本站,请捐助我们,以便我们继续努力,提供更多功能与改进: @@ -29,12 +31,11 @@ [查看本站的开发板导航页](/boards)!你可以在这里找到树莓派扩展板的引脚定义,或者体验下新板子。如果你做出来了自己的开发板,我们也很乐意把它加在这个页面中。[你可以在 GitHub.com 中向 Pinout.xyz 贡献代码](https://github.com/gadgetoid/Pinout.xyz). -## 页面中的数字代表什么意思? +## 引脚的不同编号分别代表什么? * GPIO 引脚 - 通用输入输出引脚。这些数字的字体较大,比如“GPIO 22”。你可以在树莓派或者树莓派 Zero 上使用它们。 * 硬件引脚 - 也就是引脚在端子上的硬件位置。它们的字体较小,并紧挨着引脚。比如“硬件引脚 15”。 -* WiringPi - for Gordon Henderson's Wiring Pi library. These are shown as a tooltip when you mouseover a pin. -* Rev 1 Pi - alternate GPIO/BCM numbers for the original, 26-pin model "A" and "B" Pi. +* WiringPi 引脚 - 用于 Gordon Henderson 开发的 Wiring Pi 库。 当把鼠标指针放在引脚上时,提示框中显示的就是 Wiring Pi 引脚 ## 引脚定义图的排布方向是怎样的? diff --git a/src/zh/translate/3v3-power.md b/src/zh/translate/3v3-power.md index 2802584..24290cd 100644 --- a/src/zh/translate/3v3-power.md +++ b/src/zh/translate/3v3-power.md @@ -1,9 +1,9 @@ -# W1-GPIO - One-Wire Interface +# W1-GPIO - 单线数据接口 -One-wire is a single-wire communication bus typically used to connect sensors to the Pi. +树莓派的单线数据接口是只需要一根线就能通讯的总线,通常用来与某些传感器通讯。 -The Raspberry Pi supports one-wire on any GPIO pin, but the default is GPIO 4. +树莓派支持在任何引脚上启用单线数据接口,但默认使用 GPIO 4。 -To enable the one-wire interface you need to add the following line to /boot/config.txt, before rebooting your Pi: +要启用单线数据接口,你需要编辑 `/boot/config.txt` 并添加以下信息,然后重启树莓派: ``` dtoverlay=w1-gpio ``` -or +或者,如果你想用除了 GPIO 4 以外的其他引脚: ``` dtoverlay=w1-gpio,gpiopin=x ``` -if you would like to use a custom pin (the default is GPIO 4) - -Alternatively you can enable the one-wire interface on demand using `raspi-config`, or the following: +你也可以用 `raspi-config` 命令来配置单线数据接口,或者以下命令: ``` sudo modprobe w1-gpio ``` -Newer kernels (4.9.28 and later) allow you to use dynamic overlay loading instead, including creating multiple 1-Wire busses to be used at the same time: +4.9.28 以后的内核版本可以动态加载引脚配置,还可以同时创建多个单线数据接口: ``` sudo dtoverlay w1-gpio gpiopin=4 pullup=0 # header pin 7 @@ -43,10 +41,10 @@ sudo dtoverlay w1-gpio gpiopin=17 pullup=0 # header pin 11 sudo dtoverlay w1-gpio gpiopin=27 pullup=0 # header pin 13 ``` -once any of the steps above have been performed, and discovery is complete you can list the devices that your Raspberry Pi has discovered via all 1-Wire busses (by default GPIO 4), like so: +执行了以上任意一种配置步骤后,即可用下面的命令查看树莓派已经识别的所有单线数据接口: ``` ls /sys/bus/w1/devices/ ``` -Using w1-gpio on the Raspberry Pi typically needs a 4.7 kΩ pull-up resistor connected between the GPIO pin and a 3.3v supply (e.g. header pin 1 or 17). Other means of connecting 1-Wire devices to the Raspberry Pi are also possible, such as using i2c to 1-Wire bridge chips. +通常情况下,使用单线数据接口时,需要添加一个 4.7kΩ 的上拉电阻,上拉到 3.3V(比如引脚 1 或者 17)。你也可以通过其他方法把单线数据接口的传感器连到树莓派上,比如用一个 I2C 转单线的转接板。 diff --git a/src/zh/translate/iface-gpclk.md b/src/zh/translate/iface-gpclk.md index c957e07..736ff8c 100644 --- a/src/zh/translate/iface-gpclk.md +++ b/src/zh/translate/iface-gpclk.md @@ -3,7 +3,7 @@ name: GPCLK class: interface type: pinout -description: Raspberry Pi General Purpose Clock +description: 树莓派通用时钟接口 pin: 'bcm4': name: GPCLK0 @@ -12,22 +12,22 @@ pin: 'bcm6': name: GPCLK2 --> -# GPCLK - General Purpose CLock +# GPCLK - 通用时钟 -General Purpose Clock pins can be set up to output a fixed frequency without any ongoing software control. +通用时钟可以在无需软件控制的情况下,输出固定频率的信号。 -The following clock sources are available: +此接口默认支持以下时钟源: ``` -0 0 Hz Ground -1 19.2 MHz oscillator +0 0 Hz 接地 +1 19.2 MHz 晶振 2 0 Hz testdebug0 3 0 Hz testdebug1 4 0 Hz PLLA -5 1000 MHz PLLC (changes with overclock settings) +5 1000 MHz PLLC (超频后,此数值会变化) 6 500 MHz PLLD -7 216 MHz HDMI auxiliary -8-15 0 Hz Ground +7 216 MHz HDMI 辅助 +8-15 0 Hz 接地 ``` -Other frequencies can be achieved by setting a clock-divider in the form of `SOURCE/(DIV_I + DIV_F/4096)`. Note, that the [BCM2835 ARM Peripherals](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf) document contains an error and states that the denominator of the divider is 1024 instead of 4096. +你可以通过设置时钟分频以配置其他频率的时钟信号,格式为 `SOURCE/(DIV_I + DIV_F/4096)`。注意,[BCM2835 ARM 外设](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf) 文档里面有一个错误,分频器的分母应该是 1024 而不是 4096。 diff --git a/src/zh/translate/iface-jtag.md b/src/zh/translate/iface-jtag.md index 976e398..633d97e 100644 --- a/src/zh/translate/iface-jtag.md +++ b/src/zh/translate/iface-jtag.md @@ -3,7 +3,7 @@ name: JTAG class: interface type: pinout -description: Raspberry Pi JTAG pins +description: 树莓派 JTAG 接口 pin: 'bcm4': name: TDI (Alt5) @@ -28,11 +28,11 @@ pin: 'bcm27': name: TMS (Alt4) --> -# JTAG - Joint Test Action Group +# JTAG -JTAG is a standardised interface for debugging integrated circuits which you can use to debug your Raspberry Pi. +JTAG 是一个标准化的、用于测试集成电路的接口,可以用来调试树莓派。 -There are two separate JTAG interfaces available on the Pi: +树莓派上有两个独立的 JTAG 接口: -* Alt5 on GPIOs 4, 5, 6, 12 and 13 -* Alt4 on GPIOs 22, 23, 24, 25, 26 and 27 \ No newline at end of file +* 复用功能5:GPIOs 4, 5, 6, 12, 13 +* 复用功能4:GPIOs 22, 23, 24, 25, 26, 27 diff --git a/src/zh/translate/iface-pcm.md b/src/zh/translate/iface-pcm.md index df69a48..35a6e88 100644 --- a/src/zh/translate/iface-pcm.md +++ b/src/zh/translate/iface-pcm.md @@ -3,7 +3,7 @@ name: PCM class: interface type: pinout -description: Raspberry Pi PCM pins +description: 树莓派 PCM 接口 pin: 'bcm18': name: CLK diff --git a/src/zh/translate/iface-pwm.md b/src/zh/translate/iface-pwm.md index 020fd57..4a0fa07 100644 --- a/src/zh/translate/iface-pwm.md +++ b/src/zh/translate/iface-pwm.md @@ -3,7 +3,7 @@ name: PWM class: interface type: pinout -description: Raspberry Pi PWM pins +description: 树莓派 PWM 接口 pin: '32': name: PWM0 @@ -14,6 +14,6 @@ pin: '35': name: PWM1 --> -# PWM - Pulse-width Modulation +# PWM - 脉冲宽度调制 -PWM (Pulse-width Modulation) is a method of creating an analog voltage by toggling a digital pin on and off. +PWM (脉冲宽度调制) 通过快速切换引脚电平,以实现数字信号转模拟信号。 diff --git a/src/zh/translate/iface-sd.md b/src/zh/translate/iface-sd.md index c623d5a..ce86674 100644 --- a/src/zh/translate/iface-sd.md +++ b/src/zh/translate/iface-sd.md @@ -3,7 +3,7 @@ name: SDIO class: interface type: pinout -description: Raspberry Pi SD0/SD1 pins +description: 树莓派 SD0/SD1 接口 pin: 'bcm22': name: CLK @@ -18,8 +18,8 @@ pin: 'bcm27': name: DAT3 --> -# SDIO - SD Card Interface +# SDIO - SD 卡接口 -SDIO is the SD host/eMMC interface on the Raspberry Pi. SD host signals are normally used for the microSD slot. +SDIO 是 SD 主站或者 eMMC 的接口。SD 主站通常用于读写 microSD 卡槽。 -These pins are "SD host" on Alt0 and "eMMC" on Alt3. \ No newline at end of file +这些引脚是复用功能 0 中的 “SD Host” 以及复用功能 3 中的“eMMC”。