mirror of
https://github.com/steve-m/hsdaoh-rp2350.git
synced 2025-12-10 07:44:39 +01:00
fix initial ringbuffer head value
As the first two DMA transfers have already been submitted during init, the correct start value is 2.
This commit is contained in:
parent
07d3f58650
commit
708ead241c
4 changed files with 4 additions and 4 deletions
|
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
static bool pio_dma_pong = false;
|
static bool pio_dma_pong = false;
|
||||||
uint16_t ringbuffer[RBUF_TOTAL_LEN];
|
uint16_t ringbuffer[RBUF_TOTAL_LEN];
|
||||||
int ringbuf_head = 0;
|
int ringbuf_head = 2;
|
||||||
|
|
||||||
void __scratch_y("") pio_dma_irq_handler()
|
void __scratch_y("") pio_dma_irq_handler()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
static bool pio_dma_pong = false;
|
static bool pio_dma_pong = false;
|
||||||
uint16_t ringbuffer[RBUF_TOTAL_LEN];
|
uint16_t ringbuffer[RBUF_TOTAL_LEN];
|
||||||
int ringbuf_head = 0;
|
int ringbuf_head = 2;
|
||||||
|
|
||||||
void __scratch_y("") pio_dma_irq_handler()
|
void __scratch_y("") pio_dma_irq_handler()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
static bool dma_adc_pong = false;
|
static bool dma_adc_pong = false;
|
||||||
uint16_t ringbuffer[RBUF_TOTAL_LEN];
|
uint16_t ringbuffer[RBUF_TOTAL_LEN];
|
||||||
int ringbuf_head = 0;
|
int ringbuf_head = 2;
|
||||||
|
|
||||||
void __scratch_y("") adc_dma_irq_handler()
|
void __scratch_y("") adc_dma_irq_handler()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
static bool pio_dma_pong = false;
|
static bool pio_dma_pong = false;
|
||||||
uint16_t ringbuffer[RBUF_TOTAL_LEN];
|
uint16_t ringbuffer[RBUF_TOTAL_LEN];
|
||||||
int ringbuf_head = 0;
|
int ringbuf_head = 2;
|
||||||
|
|
||||||
void __scratch_y("") pio_dma_irq_handler()
|
void __scratch_y("") pio_dma_irq_handler()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue