remove adafruit_pioasm dependency
This commit is contained in:
parent
914f449699
commit
3f826267b4
@ -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`
|
||||
|
@ -2,11 +2,10 @@
|
||||
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
|
||||
; An 8n1 UART transmit program.
|
||||
@ -16,11 +15,13 @@ 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
|
||||
|
||||
; Minimum viable 8n1 UART receiver. Wait for the start bit, then sample 8 bits
|
||||
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user