From e848b61ca045041e28ec83656c8c9338923e20ce Mon Sep 17 00:00:00 2001 From: Tangxiulin <11016272+ha-ha-earl@user.noreply.gitee.com> Date: Wed, 2 Apr 2025 16:08:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.wiki=E4=B8=ADEC800M=20i2c1=E5=BC=95?= =?UTF-8?q?=E8=84=9A=E4=B8=8D=E6=AD=A3=E7=A1=AE=EF=BC=8C=E9=9C=80=E8=A1=A5?= =?UTF-8?q?=E5=85=85I2C2=E3=80=81I2C3=E5=BC=95=E8=84=9A=202.=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E8=8B=B1=E6=96=87pin=E8=A1=A8=E4=B8=AD=E5=A4=9A?= =?UTF-8?q?=E4=BD=99=E7=9A=84FCM360W=E5=9E=8B=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/peripherals/machine.I2C.md | 51 +++++++++++++++++++++++++++---- en/peripherals/machine.Pin.md | 56 ----------------------------------- zh/peripherals/machine.I2C.md | 50 ++++++++++++++++++++++++++++++- 3 files changed, 95 insertions(+), 62 deletions(-) diff --git a/en/peripherals/machine.I2C.md b/en/peripherals/machine.I2C.md index ecc0ffd..94467f2 100644 --- a/en/peripherals/machine.I2C.md +++ b/en/peripherals/machine.I2C.md @@ -7,7 +7,7 @@ This class is designed for the two-wire serial protocol for communication betwee ### `machine.I2C`
-
+
class machine.I2C(I2Cn, MODE)
 

Parameter:

@@ -20,6 +20,19 @@ This class is designed for the two-wire serial protocol for communication betwee
+
+
class machine.I2C(I2Cn, MODE)
+
+

Parameter:

+
    +
  • I2Cn - Integer type. I2C channel index number.
    I2C0 : 0 - Channel 0
    I2C1 : 1 - Channel 1
    I2C2 : 2 - Channel 2
    I2C3 : 3 - Channel 3

    +
  • +
  • MODE - Integer type. I2C working mode.
    STANDARD_MODE : 0 - Standard mode
    FAST_MODE1 - Fast mode

    +
  • + +
+
+
class machine.I2C(I2Cn, MODE)
 
@@ -300,9 +313,19 @@ This class is designed for the two-wire serial protocol for communication betwee I2C1 + pin75 + pin74 + + + I2C2 pin68 pin69 + + I2C3 + pin57 + pin58 + @@ -322,9 +345,19 @@ This class is designed for the two-wire serial protocol for communication betwee I2C1 + pin75 + pin74 + + + I2C2 pin68 pin69 + + I2C3 + pin57 + pin58 + @@ -945,6 +978,14 @@ if __name__ == '__main__': I2C.I2C1 I2C passage index number: 1 + + I2C.I2C2 + I2C passage index number: 2 + + + I2C.I2C3 + I2C passage index number: 3 + I2C.STANDARD_MODE Standard mode @@ -973,12 +1014,12 @@ if __name__ == '__main__': I2C passage index number: 1 - I2C.STANDARD_MODE - Standard mode + I2C.I2C2 + I2C passage index number: 2 - I2C.FAST_MODE - Fast mode + I2C.I2C3 + I2C passage index number: 3 diff --git a/en/peripherals/machine.Pin.md b/en/peripherals/machine.Pin.md index 748e9de..4a849f5 100644 --- a/en/peripherals/machine.Pin.md +++ b/en/peripherals/machine.Pin.md @@ -3064,63 +3064,7 @@ class machine.Pin(GPIOn, direction, pullMode, level) Pin19 - - Pin20 - - - Pin21 - - - Pin22 - - - Pin23 - - - Pin29 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/zh/peripherals/machine.I2C.md b/zh/peripherals/machine.I2C.md index 0c8e2f6..8e654f7 100644 --- a/zh/peripherals/machine.I2C.md +++ b/zh/peripherals/machine.I2C.md @@ -8,7 +8,7 @@ ### `machine.I2C`
-
+
class machine.I2C(I2Cn, MODE)
 

参数描述:

@@ -20,6 +20,18 @@
+
+
class machine.I2C(I2Cn, MODE)
+
+

参数描述:

+
    +
  • I2Cn - I2C 通路索引号,int类型,说明如下:
    I2C0 : 0 - 通道0
    I2C1 : 1 - 通道1
    I2C2 : 2 - 通道2
    I2C3 : 3 - 通道3

    +
  • +
  • MODE - I2C 的工作模式,int类型,说明如下:
    STANDARD_MODE : 0 - 标准模式
    FAST_MODE1 - 快速模式

    +
  • +
+
+
class machine.I2C(I2Cn, MODE)
 
@@ -301,9 +313,19 @@
+ + + + + + + + + +
Pin number
Pin6
Pin7
Pin8
Pin9
Pin10
Pin12
Pin13
Pin14
Pin15
Pin16
Pin19
Pin20
I2C1引脚75引脚74
I2C2 引脚68 引脚69
I2C3引脚57引脚58
@@ -323,9 +345,19 @@ I2C1 + 引脚75 + 引脚74 + + + I2C2 引脚68 引脚69 + + I2C3 + 引脚57 + 引脚58 + @@ -938,6 +970,14 @@ if __name__ == '__main__': I2C.I2C1 I2C通路索引号: 1 + + I2C.I2C2 + I2C通路索引号: 2 + + + I2C.I2C3 + I2C通路索引号: 3 + I2C.STANDARD_MODE 标准模式 @@ -965,6 +1005,14 @@ if __name__ == '__main__': I2C.I2C1 I2C通路索引号: 1 + + I2C.I2C2 + I2C通路索引号: 2 + + + I2C.I2C3 + I2C通路索引号: 3 + I2C.STANDARD_MODE 标准模式 -- Gitee From 6811f6e9bd421a11b8ea7f372458c4fbf88b3e92 Mon Sep 17 00:00:00 2001 From: Tangxiulin <11016272+ha-ha-earl@user.noreply.gitee.com> Date: Wed, 2 Apr 2025 16:42:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1.wiki=E4=B8=ADEC800M=E9=A1=B9=E7=9B=AEI2C1?= =?UTF-8?q?=E5=BC=95=E8=84=9A=E4=B8=8D=E6=AD=A3=E7=A1=AE=EF=BC=8C=E4=B8=94?= =?UTF-8?q?=E9=9C=80=E8=A1=A5=E5=85=85I2C2=E3=80=81I2C3=E5=BC=95=E8=84=9A?= =?UTF-8?q?=202.=E5=88=A0=E9=99=A4=E8=8B=B1=E6=96=87machine=5Fpin=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E5=A4=9A=E4=BD=99=E7=9A=84FCM360W=E5=9E=8B?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/peripherals/machine.I2C.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/en/peripherals/machine.I2C.md b/en/peripherals/machine.I2C.md index 94467f2..a493364 100644 --- a/en/peripherals/machine.I2C.md +++ b/en/peripherals/machine.I2C.md @@ -1021,6 +1021,14 @@ if __name__ == '__main__': I2C.I2C3 I2C passage index number: 3 + + I2C.STANDARD_MODE + Standard mode + + + I2C.FAST_MODE + Fast mode + -- Gitee