summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-12-24 01:11:13 +0700
committerhathach <[email protected]>2022-12-24 01:11:13 +0700
commit48d4a67ec5468f9fd7c073acd599a1271b9e877f (patch)
tree980413ad1b67e8166ee78deb336cbcd95d5a4663 /src/common
parent48f4d8b7f7eda7ee4046c1c6cd9be2b5c0d81603 (diff)
add tuh_cdc_peek()
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_fifo.c2
-rw-r--r--src/common/tusb_private.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c
index b857c6444..d45ca09ed 100644
--- a/src/common/tusb_fifo.c
+++ b/src/common/tusb_fifo.c
@@ -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
diff --git a/src/common/tusb_private.h b/src/common/tusb_private.h
index d0c7a84fb..d5541856c 100644
--- a/src/common/tusb_private.h
+++ b/src/common/tusb_private.h
@@ -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
}