X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/6eb178d1ac69b29a1a5f2081515a0ac4c0e62684..85e40fd98d2a61d67ef21c794588bf00270b53c8:/src/adafruit_blinka/microcontroller/esp8266/pin.py?ds=sidebyside diff --git a/src/adafruit_blinka/microcontroller/esp8266/pin.py b/src/adafruit_blinka/microcontroller/esp8266/pin.py old mode 100644 new mode 100755 index 647ac75..986b968 --- a/src/adafruit_blinka/microcontroller/esp8266/pin.py +++ b/src/adafruit_blinka/microcontroller/esp8266/pin.py @@ -1,3 +1,5 @@ +"""ESP8266 pin names""" + from microcontroller import Pin GPIO0 = Pin(0) @@ -12,27 +14,15 @@ GPIO14 = Pin(14) GPIO15 = Pin(15) GPIO16 = Pin(16) TOUT = Pin("TOUT") -""" -From introspection of microcontroller.pin on Feather Huzzah running CircuitPython ->>> dir(microcontroller.pin) -['TOUT', 'XPD_DCDC', 'MTMS', 'MTDI', 'MTCK', 'MTDO', 'GPIO2', 'GPIO0', 'GPIO4', 'SD_DATA_2', 'SD_DATA_3', 'SD_CMD', 'SD_CLK', 'SD_DATA_0', 'SD_DATA_1', 'DVDD', 'U0RXD', 'U0TXD'] ->>> dir(board) -['ADC', 'GPIO16', 'GPIO14', 'SCK', 'GPIO12', 'MISO', 'GPIO13', 'MOSI', 'GPIO15', 'GPIO2', 'GPIO0', 'GPIO4', 'SDA', 'RX', 'TX', 'GPIO5', 'SCL'] -""" -""" -class cpu(): - def frequency(self): - from machine import freq - return freq() -""" # ordered as spiId, sckId, mosiId, misoId -spiPorts = ((1, GPIO14, GPIO13, GPIO12)) +SPI_PORTS = ((1, GPIO14, GPIO13, GPIO12)) # ordered as uartId, txId, rxId -uartPorts = ( +UART_PORTS = ( (0, GPIO1, GPIO3), - # (0, GPIO15, GPIO13) # TODO secondary pins for UART0 configurable from Micropython? How to flag? + # TODO secondary pins for UART0 configurable from Micropython? How to flag? + # (0, GPIO15, GPIO13) (1, GPIO2, None)) -i2cPorts = () \ No newline at end of file +I2C_PORTS = ()