Skip to content

Commit b17fc76

Browse files
authored
Clarify multicore_fifo doxygen (#323)
Based on my observations in #284
1 parent b8dbbcf commit b17fc76

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/rp2_common/pico_multicore/include/pico/multicore.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ uint32_t multicore_fifo_pop_blocking(void);
119119

120120
bool multicore_fifo_pop_timeout_us(uint64_t timeout_us, uint32_t *out);
121121

122-
/*! \brief Flush any data in the outgoing FIFO
122+
/*! \brief Flush any data in the incoming FIFO
123123
* \ingroup multicore_fifo
124124
*
125125
*/
@@ -130,9 +130,12 @@ static inline void multicore_fifo_drain(void) {
130130

131131
/*! \brief Clear FIFO interrupt
132132
* \ingroup multicore_fifo
133+
*
134+
* Note that this only clears an interrupt that was caused by the ROE or WOF flags.
135+
* To clear the VLD flag you need to use one of the 'pop' or 'drain' functions.
133136
*/
134137
static inline void multicore_fifo_clear_irq(void) {
135-
// Write any value to clear any interrupts
138+
// Write any value to clear the error flags
136139
sio_hw->fifo_st = 0xff;
137140
}
138141

0 commit comments

Comments
 (0)