add tuh_cdc_peek()

This commit is contained in:
hathach
2022-12-24 01:11:13 +07:00
parent 48f4d8b7f7
commit 48d4a67ec5
5 changed files with 17 additions and 3 deletions

View File

@@ -682,8 +682,6 @@ uint16_t tu_fifo_read_n_const_addr_full_words(tu_fifo_t* f, void * buffer, uint1
@param[in] f
Pointer to the FIFO buffer to manipulate
@param[in] offset
Position to read from in the FIFO buffer with respect to read pointer
@param[in] p_buffer
Pointer to the place holder for data read from the buffer

View File

@@ -160,6 +160,11 @@ uint32_t tu_edpt_stream_read_available(tu_edpt_stream_t* s)
return (uint32_t) tu_fifo_count(&s->ff);
}
TU_ATTR_ALWAYS_INLINE static inline
bool tu_edpt_stream_peek(tu_edpt_stream_t* s, uint8_t* ch)
{
return tu_fifo_peek(&s->ff, ch);
}
#ifdef __cplusplus
}