Skip to content
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

Fifo Remaining Space function + Test File #595

Closed
wants to merge 7 commits into from
Closed

Conversation

MichaelMohn
Copy link
Contributor

@MichaelMohn MichaelMohn commented Nov 18, 2023

I added a "space" function in the fifo library that returns how much room is available in the fifo. I also created a test for fifo.h

Quality Assurance Checklist

To make reviews more efficient, please make sure the software feature meets the following standards and check everything off that meets the quality check. Once everything has been checked, the assigned reviewers will begin the review process. Edit this description to check off the list.

There are exceptions with all guidelines. As long as your decisions are justified, then you are good! Contact the reviewers or the leads about any exceptions.

Requirements

  • Followed Coding Style Guide
  • Code Build checks pass
  • No merge conflicts
  • Software feature has test associated with it.
  • Software feature has documentation for it updated.
  • If applicable, does software feature have simulation test associated with it (.json & out.json file)
  • Test provides useful information and uses relevant data to accurately represent BPS
    • NOTE: If test file already exists, use that one
  • 2 Members of the team have already reviewed my PR
    • NOTE: Approver will not look at PR if 2 other members haven't reviewed first
  • Did you Have Fun?

Things to Consider

  • Even if the above are checked, is this the best way of writing my code?
    • It's possible to write code that works, but are there ways to make code more efficient?

printf("Test 8 expected output: 127, Received: %u", out);

//Fill the Fifo
for(uint8_t i = 0; i < 127; i++){
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe represent 127 as a variable for readability?

Copy link
Collaborator

@tiandahuang tiandahuang left a comment

Choose a reason for hiding this comment

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

this doesn't return how much space is actually left in the fifo:
please consult this for more information on the use of the get and put pointers.
https://en.wikipedia.org/wiki/Circular_buffer

@tiandahuang tiandahuang closed this Apr 1, 2024
@tiandahuang tiandahuang deleted the fifo_space branch April 1, 2024 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants