Skip to content

Clarify multicore_fifo doxygen #323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/rp2_common/pico_multicore/include/pico/multicore.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ uint32_t multicore_fifo_pop_blocking(void);

bool multicore_fifo_pop_timeout_us(uint64_t timeout_us, uint32_t *out);

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

/*! \brief Clear FIFO interrupt
* \ingroup multicore_fifo
*
* Note that this only clears an interrupt that was caused by the ROE or WOF flags.
* To clear the VLD flag you need to use one of the 'pop' or 'drain' functions.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah; i guess we should rename this function as it doesn't really do what it says; perhaps multicore_clear_sticky_errors

Note we need a little documentation update here (this file) anyway to discourage use of the FIFOs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess we should rename this function

That would be a backwards-incompatible change, which according to semver conventions would necessitate a version-bump to 2.0.0

Note we need a little documentation update here (this file) anyway to discourage use of the FIFOs

Sounds like a Graham-job to me! 😉 I know very little about the FIFOs (and even less about multicore in general).

static inline void multicore_fifo_clear_irq(void) {
// Write any value to clear any interrupts
// Write any value to clear the error flags
sio_hw->fifo_st = 0xff;
}

Expand Down