remove adafruit_pioasm dependency

This commit is contained in:
xs5871 2022-07-14 13:55:05 +00:00 committed by Kyle Brown
parent 914f449699
commit 3f826267b4
2 changed files with 11 additions and 12 deletions

View File

@ -108,10 +108,7 @@ If you're using an RP2040 based board and want the split communication to use ot
In order to enable it, you must:
- Install Circuitpython version > 7.2,
- add the `adafruit_pioasm.mpy` library to the lib or root folder of the boards,
- and pass `use_pio=True` into the `Split()` constructor.
The file is available [on the library release page](https://github.com/adafruit/Adafruit_CircuitPython_PIOASM/releases). From the `adafruit-circuitpython-pioasm-x.y-mpy-0.x.y.zip`, copy the `lib` folder (or its content) to the root of your circuitpython drives. Make sure to get the zip corresponding to your circuitpython version as the mpy format can evolve!
- pass `use_pio=True` into the `Split()` constructor.
### `data_pin`/`data_pin2`

View File

@ -2,10 +2,9 @@
Circuit Python wrapper around PIO implementation of UART
Original source of these examples: https://github.com/adafruit/Adafruit_CircuitPython_PIOASM/tree/main/examples (MIT)
'''
import adafruit_pioasm
import rp2pio
from array import array
tx_code = adafruit_pioasm.assemble(
'''
.program uart_tx
.side_set 1 opt
@ -16,10 +15,12 @@ tx_code = adafruit_pioasm.assemble(
bitloop: ; This loop will run 8 times (8n1 UART)
out pins, 1 ; Shift 1 bit from OSR to the first OUT pin
jmp x-- bitloop [6] ; Each loop iteration is 8 cycles.
'''
)
rx_code = adafruit_pioasm.assemble(
; compiles to:
'''
tx_code = array('H', [40864, 63271, 24577, 1602])
'''
.program uart_rx_mini
@ -34,8 +35,9 @@ bitloop: ; Loop 8 times
in pins, 1 ; Sample data
jmp x-- bitloop [6] ; Each iteration is 8 cycles
; compiles to:
'''
)
rx_code = array('H', [8224, 59943, 16385, 1602])
class PIO_UART: