Small doc/example changes

* Use PIO IRQ accessors in PIO I2C example

* Update pio/ir_nec/README.adoc file links (#183)

The "List of Files" now links (only) to files, not to directories (which prevented this example being included in the C SDK databook)
This commit is contained in:
Graham Sanderson
2021-11-24 19:02:20 -06:00
committed by GitHub
parent 188d849b1f
commit afd1d2008f
4 changed files with 22 additions and 22 deletions

View File

@@ -13,13 +13,13 @@ const int PIO_I2C_NAK_LSB = 0;
bool pio_i2c_check_error(PIO pio, uint sm) {
return !!(pio->irq & (1u << sm));
return pio_interrupt_get(pio, sm);
}
void pio_i2c_resume_after_error(PIO pio, uint sm) {
pio_sm_drain_tx_fifo(pio, sm);
pio_sm_exec(pio, sm, (pio->sm[sm].execctrl & PIO_SM0_EXECCTRL_WRAP_BOTTOM_BITS) >> PIO_SM0_EXECCTRL_WRAP_BOTTOM_LSB);
pio->irq = 1u << sm;
pio_interrupt_clear(pio, sm);
}
void pio_i2c_rx_enable(PIO pio, uint sm, bool en) {