+# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
"""A Pin class for use with Rockchip RK3328."""
-from adafruit_blinka.microcontroller.generic_linux.sysfs_pin import Pin
+from adafruit_blinka.microcontroller.generic_linux.libgpiod_pin import Pin
GPIO0_A0 = Pin((0, 0))
GPIO0_A1 = Pin((0, 1))
GPIO0_A4 = Pin((0, 4))
GPIO0_A5 = Pin((0, 5))
GPIO0_A6 = Pin((0, 6))
-GPIO0_B7 = Pin((0, 7))
+GPIO0_A7 = Pin((0, 7))
GPIO0_B0 = Pin((0, 8))
GPIO0_B1 = Pin((0, 9))
GPIO0_B2 = Pin((0, 10))
GPIO1_A4 = Pin((1, 4))
GPIO1_A5 = Pin((1, 5))
GPIO1_A6 = Pin((1, 6))
-GPIO1_B7 = Pin((1, 7))
+GPIO1_A7 = Pin((1, 7))
GPIO1_B0 = Pin((1, 8))
GPIO1_B1 = Pin((1, 9))
GPIO1_B2 = Pin((1, 10))
GPIO2_A4 = Pin((2, 4))
GPIO2_A5 = Pin((2, 5))
GPIO2_A6 = Pin((2, 6))
-GPIO2_B7 = Pin((2, 7))
+GPIO2_A7 = Pin((2, 7))
GPIO2_B0 = Pin((2, 8))
GPIO2_B1 = Pin((2, 9))
GPIO2_B2 = Pin((2, 10))
GPIO3_A4 = Pin((3, 4))
GPIO3_A5 = Pin((3, 5))
GPIO3_A6 = Pin((3, 6))
-GPIO3_B7 = Pin((3, 7))
+GPIO3_A7 = Pin((3, 7))
GPIO3_B0 = Pin((3, 8))
GPIO3_B1 = Pin((3, 9))
GPIO3_B2 = Pin((3, 10))
PWM2 = GPIO2_A6
# ordered as i2cId, SCL, SDA
-i2cPorts = (
- (0, I2C1_SCL, I2C1_SDA),)
+i2cPorts = ((0, I2C1_SCL, I2C1_SDA),)
# ordered as spiId, sckId, mosiId, misoId
spiPorts = ((0, SPI0_SCLK, SPI0_MOSI, SPI0_MISO),)
# SysFS pwm outputs, pwm channel and pin in first tuple
-pwmOuts = (
- ((2, 0), PWM0),)
+pwmOuts = (((2, 0), PWM2),)