Skip to content

Commit 65708d3

Browse files
Change default configuration to use one PIO
1 parent 4ffd67b commit 65708d3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/pio_usb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static void __no_inline_not_in_flash_func(send_pre)(const pio_port_t *pp) {
5353
dma_channel_transfer_from_buffer_now(pp->tx_ch, data, 2);
5454

5555
pio_sm_exec(pp->pio_usb_tx, pp->sm_tx, pp->tx_start_instr);
56-
pp->pio_usb_tx->irq |= IRQ_TX_ALL_MASK; // clear complete flag
56+
pp->pio_usb_tx->irq = IRQ_TX_ALL_MASK; // clear complete flag
5757

5858
io_ro_32 *pc = &pp->pio_usb_tx->sm[pp->sm_tx].addr;
5959
while ((pp->pio_usb_tx->irq & IRQ_TX_EOP_MASK) == 0) {
@@ -88,7 +88,7 @@ void __not_in_flash_func(pio_usb_bus_usb_transfer)(const pio_port_t *pp,
8888

8989
pio_sm_exec(pp->pio_usb_tx, pp->sm_tx, pp->tx_start_instr);
9090
dma_channel_transfer_from_buffer_now(pp->tx_ch, data, len);
91-
pp->pio_usb_tx->irq |= IRQ_TX_ALL_MASK; // clear complete flag
91+
pp->pio_usb_tx->irq = IRQ_TX_ALL_MASK; // clear complete flag
9292

9393
io_ro_32 *pc = &pp->pio_usb_tx->sm[pp->sm_tx].addr;
9494
while ((pp->pio_usb_tx->irq & IRQ_TX_ALL_MASK) == 0) {

src/pio_usb_configuration.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ typedef struct {
2929
#define PIO_SM_USB_TX_DEFAULT 0
3030
#define PIO_USB_DMA_TX_DEFAULT 0
3131

32-
#define PIO_USB_RX_DEFAULT 1
33-
#define PIO_SM_USB_RX_DEFAULT 0
34-
#define PIO_SM_USB_EOP_DEFAULT 1
32+
#define PIO_USB_RX_DEFAULT 0
33+
#define PIO_SM_USB_RX_DEFAULT 1
34+
#define PIO_SM_USB_EOP_DEFAULT 2
3535

3636
#define PIO_USB_DEBUG_PIN_NONE (-1)
3737

0 commit comments

Comments
 (0)