X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/c4fe2662f97a9dc36185701032870dc3ac0d7851..6792e8a324afa195e7d1dbaef69a49318f4b2ce2:/src/adafruit_blinka/microcontroller/starfive/JH7110/pin.py diff --git a/src/adafruit_blinka/microcontroller/starfive/JH7110/pin.py b/src/adafruit_blinka/microcontroller/starfive/JH7110/pin.py index f272a36..dbb97ba 100644 --- a/src/adafruit_blinka/microcontroller/starfive/JH7110/pin.py +++ b/src/adafruit_blinka/microcontroller/starfive/JH7110/pin.py @@ -23,8 +23,8 @@ class Pin: _value = LOW _mode = IN - def __init__(self, bcm_number): - self.id = bcm_number + def __init__(self, number): + self.id = number def __repr__(self): return str(self.id) @@ -34,6 +34,7 @@ class Pin: def init(self, mode=IN, pull=None): """Initialize the Pin""" + print(self.id) if mode is not None: if mode == self.IN: self._mode = self.IN @@ -97,23 +98,23 @@ D37 = Pin(37) D38 = Pin(38) D40 = Pin(40) # I2C -SDA = D3 -SCL = D5 +I2C_SDA = D3 +I2C_SCL = D5 # SPI -MISO = D21 -MOSI = D19 -SCLK = D23 +SPI_MISO = D21 +SPI_MOSI = D19 +SPI_SCLK = D23 # UART UART_TX = D8 UART_RX = D10 # ordered as i2cId, SCL, SDA -i2cPorts = ((0, SCL, SDA),) +i2cPorts = ((0, I2C_SCL, I2C_SDA),) # ordered as spiId, sckId, mosiId, misoId -spiPorts = ((0, SCLK, MOSI, MISO),) +spiPorts = ((0, SPI_SCLK, SPI_MOSI, SPI_MISO),) # ordered as uartId, txId, rxId uartPorts = ((0, UART_TX, UART_RX),)