Skip to content

Commit

Permalink
lib: introduce flag to signal stream ID presence
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-m committed Feb 14, 2025
1 parent 058c13d commit 7ab786c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libpicohsdaoh/picohsdaoh.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static bool vactive_cmdlist_posted = false;
static uint8_t dma_sniff_pipelined_ch = 0;
static bool dma_sniff_pipelined_disable = false;

metadata_t metadata = (metadata_t) { .magic = 0xda7acab1, .crc_config = CRC16_2_LINE, .version = 1 };
metadata_t metadata = (metadata_t) { .magic = 0xda7acab1, .crc_config = CRC16_2_LINE, .version = 1, .flags = FLAG_STREAM_ID_PRESENT };

/* HSTX DMA IRQ handler, reconfigures the channel that just completed while
* ther other channel is currently busy */
Expand Down
2 changes: 2 additions & 0 deletions libpicohsdaoh/picohsdaoh.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ typedef struct
uint8_t stream_cnt;
} __attribute__((packed, aligned(1))) metadata_t;

#define FLAG_STREAM_ID_PRESENT (1 << 0)

void hsdaoh_start(void);
void hsdaoh_init(int dstrength, int slewrate);
void hsdaoh_update_head(int stream_id, int head);
Expand Down

0 comments on commit 7ab786c

Please sign in to comment.