Commit bc854ec4 authored by Mike Szczys's avatar Mike Szczys

Use hardware spi

parent 0bdcbe79
......@@ -9,7 +9,7 @@ ttgo_hello.py
"""
import random
from machine import Pin, SoftSPI
from machine import Pin, SPI
import st7789 as st7789
import time
import utime
......@@ -20,7 +20,7 @@ import vga1_8x16 as font
def main():
tft = st7789.ST7789(
SoftSPI(baudrate=30000000, polarity=1, phase=1, sck=Pin(18), mosi=Pin(19), miso=Pin(21)),
SPI(2, baudrate=30000000, polarity=1, phase=1, sck=Pin(18), mosi=Pin(19)),
135,
240,
reset=Pin(23, Pin.OUT),
......
......@@ -8,7 +8,7 @@ ttgo_fonts.py
"""
import utime
import random
from machine import Pin, SoftSPI
from machine import Pin, SPI
import st7789
import vga1_8x8 as font1
......@@ -19,7 +19,7 @@ import vga1_bold_16x32 as font4
def main():
tft = st7789.ST7789(
SoftSPI(baudrate=30000000, polarity=1, phase=1, sck=Pin(18), mosi=Pin(19), miso=Pin(21)),
SPI(2, baudrate=30000000, polarity=1, phase=1, sck=Pin(18), mosi=Pin(19)),
135,
240,
reset=Pin(23, Pin.OUT),
......
......@@ -8,7 +8,7 @@ ttgo_hello.py
"""
import random
from machine import Pin, SoftSPI
from machine import Pin, SPI
import st7789
import vga1_bold_16x32 as font
......@@ -16,7 +16,7 @@ import vga1_bold_16x32 as font
def main():
tft = st7789.ST7789(
SoftSPI(baudrate=30000000, polarity=1, phase=1, sck=Pin(18), mosi=Pin(19), miso=Pin(21)),
SPI(2, baudrate=30000000, polarity=1, phase=1, sck=Pin(18), mosi=Pin(19)),
135,
240,
reset=Pin(23, Pin.OUT),
......
......@@ -9,7 +9,7 @@ ttgo_hershey.py
import utime
import random
import sys
from machine import Pin, SoftSPI
from machine import Pin, SPI
import st7789
# Load several frozen fonts from flash
......@@ -65,7 +65,7 @@ def main():
'''
# configure display
tft = st7789.ST7789(
SoftSPI(baudrate=30000000, polarity=1, phase=1, sck=Pin(18), mosi=Pin(19), miso=Pin(21)),
SPI(2, baudrate=30000000, polarity=1, phase=1, sck=Pin(18), mosi=Pin(19)),
135,
240,
reset=Pin(23, Pin.OUT),
......
......@@ -9,7 +9,7 @@ ttgo_scroll.py
"""
import utime
import random
from machine import Pin, SoftSPI
from machine import Pin, SPI
import st7789
import vga1_bold_16x16 as font
......@@ -30,7 +30,7 @@ def cycle(p):
def main():
tft = st7789.ST7789(
SoftSPI(baudrate=30000000, polarity=1, phase=1, sck=Pin(18), mosi=Pin(19), miso=Pin(21)),
SPI(2, baudrate=30000000, polarity=1, phase=1, sck=Pin(18), mosi=Pin(19)),
135,
240,
reset=Pin(23, Pin.OUT),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment