/* Advance write pointer - intended to be used in combination with DMA. It is possible to fill the FIFO by use of a DMA in circular mode. Within DMA ISRs you may update the write pointer to be able to read from the FIFO. As long as the DMA is the only process writing into the FIFO this is safe to use. 
USE WITH CARE - WE DO NOT CONDUCT SAFETY CHECKS HERE! */
void tu_fifo_advance_write_pointer(tu_fifo_t *f, uint16_t n)
/* Advance write pointer - intended to be used in combination with DMA. It is possible to fill the FIFO by use of a DMA in circular mode. Within DMA ISRs you may update the write pointer to be able to read from the FIFO. As long as the DMA is the only process writing into the FIFO this is safe to use. 
USE WITH CARE - WE DO NOT CONDUCT SAFETY CHECKS HERE! */
void tu_fifo_advance_write_pointer(tu_fifo_t *f, uint16_t n)
{
  f->wr_idx = advance_index(f->depth, f->wr_idx, n);
}