top: Update Python formatting to black "2023 stable style".
See https://black.readthedocs.io/en/stable/the_black_code_style/index.html Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
@@ -10,7 +10,6 @@ switch = pyb.Switch()
|
||||
|
||||
# loop
|
||||
while True:
|
||||
|
||||
# wait for interrupt
|
||||
# this reduces power consumption while waiting for switch press
|
||||
pyb.wfi()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@micropython.asm_thumb
|
||||
def asm_sum_words(r0, r1):
|
||||
|
||||
# r0 = len
|
||||
# r1 = ptr
|
||||
# r2 = sum
|
||||
@@ -25,7 +24,6 @@ def asm_sum_words(r0, r1):
|
||||
|
||||
@micropython.asm_thumb
|
||||
def asm_sum_bytes(r0, r1):
|
||||
|
||||
# r0 = len
|
||||
# r1 = ptr
|
||||
# r2 = sum
|
||||
|
||||
@@ -20,6 +20,7 @@ if hasattr(machine, "Timer"):
|
||||
else:
|
||||
_timer = None
|
||||
|
||||
|
||||
# Batch writes into 50ms intervals.
|
||||
def schedule_in(handler, delay_ms):
|
||||
def _wrap(_arg):
|
||||
|
||||
@@ -4,6 +4,7 @@ import pyb
|
||||
lcd = pyb.LCD("x")
|
||||
lcd.light(1)
|
||||
|
||||
|
||||
# do 1 iteration of Conway's Game of Life
|
||||
def conway_step():
|
||||
for x in range(128): # loop over x coordinates
|
||||
|
||||
@@ -8,6 +8,7 @@ import time
|
||||
from machine import Pin
|
||||
import rp2
|
||||
|
||||
|
||||
# Define an empty program that uses a single set pin.
|
||||
@rp2.asm_pio(set_init=rp2.PIO.OUT_LOW)
|
||||
def prog():
|
||||
|
||||
@@ -33,6 +33,7 @@ for i in range(NUM_UARTS):
|
||||
sm.active(1)
|
||||
uarts.append(sm)
|
||||
|
||||
|
||||
# We can print characters from each UART by pushing them to the TX FIFO
|
||||
def pio_uart_print(sm, s):
|
||||
for c in s:
|
||||
|
||||
Reference in New Issue
Block a user