rp2/rp2_pio: Fix sm.get(buf) to not wait after getting last item.
rp2/rp2_pio: Fix sm.get(buf) to not wait after getting last item.

sm.get(buf) was waiting for one item more than the length of the supplied
buffer.  Even if this item was not stored, sm_get would block trying to get
an item from the RX fifo.

As part of the fix, the edge case for a zero length buffer was moved up to
the section where the function arguments are handled.  In case of a zero
length buffer, sm.get() now returns immediately that buffer.

henriknelson/micropython,bvernoux/micropython,adafruit/circuitpython,adafruit/circuitpython,bvernoux/micropython,bvernoux/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,henriknelson/micropython,bvernoux/micropython,henriknelson/micropython,henriknelson/micropython,bvernoux/micropython,henriknelson/micropython,adafruit/circuitpython