summaryrefslogtreecommitdiff
path: root/ports/raspberrypi/common-hal/rp2pio/StateMachine.c
AgeCommit message (Collapse)Author
2021-03-15Merge pull request #4405 from DavePutz/issue_4237Scott Shawcroft
Issue 4237 - Changed initial setting in program_struct
2021-03-15run code formatting scriptmicroDev
2021-03-14Fixed initial settings for program_struct to allow more than 1 program per pioroot
2021-03-08Merge branch 'main' into issue_4111DavePutz
2021-03-05WIPrp2040: Implement IncrementalEncoderJeff Epler
Any two consecutive pins can be used for an IncrementalEncoder Testing performed: Put a synthesized (few hundred counts per second) quadrature signal into GP2/3 and read the encoder out. Performed filesystem operations at the same time to stress test it. The reasons for not using common_hal_rp2pio_statemachine_readinto are commented on.
2021-03-04Merge branch 'main' into issue_4111DavePutz
2021-03-04StateMachine: Add pull up/down for inputsJeff Epler
2021-03-04StateMachine: Add in_available propertyJeff Epler
I named the property `in_available` because it is similar to pyserial. However, it indicates the number of words in the fifo, not the number of bytes.
2021-03-03Merge pull request #4265 from DavePutz/pio_soft_resetScott Shawcroft
Clear out PIOs and State Machines on RP2040 soft reset
2021-03-01rp2pio: allow keyboard interrupt while waiting for tx fifo to empty (& stall)Jeff Epler
2021-02-26Changed reset_rp2pio_statemachine to clean up any PIO interrupts.root
2021-02-26Typo fix: direcion -> directionScott Shawcroft
2021-02-25rp2pio: Fix writing where the stride was 2 or 4Jeff Epler
The wrong stride value was being checked.
2021-02-24pulseio (pulsein) for RP2040root
2021-02-23Add state machine divisor checkScott Shawcroft
This causes an exception when setting a state machine too slow or too fast. Fixes #4222
2021-02-23Implement audiobusio and enhance PIO for itScott Shawcroft
This adds I2SOut and PDMIn support via PIO. StateMachines can now: * read and read while writing * transfer in 1, 2 or 4 byte increments * init pins based on expected defaults automatically * be stopped and restarted * rxfifo can be cleared and rxstalls detected (good for tracking when the reading code isn't keeping up) Fixes #4162
2021-02-08rp2pio: Transfer up to 32 bytes before checking background tasksJeff Epler
@Jerryneedell noticed that this problem affected strips short enough to not use the DMA peripheral, thanks for the hot tip! Instead of checking for background tasks after every byte transfer, try up to 32 transfers before attending to background tasks. This fixes the problem I was seeing on my 5-pixel circuit. Closes #4135.
2021-01-20pre-commitScott Shawcroft
2021-01-20Add initial RP2040 supportScott Shawcroft
The RP2040 is new microcontroller from Raspberry Pi that features two Cortex M0s and eight PIO state machines that are good for crunching lots of data. It has 264k RAM and a built in UF2 bootloader too. Datasheet: https://pico.raspberrypi.org/files/rp2040_datasheet.pdf