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

Alex/clean up #144

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

aodonnell-ca
Copy link

Suggested clean up

  1. I know some repos manage indentation automatically, but this repo had mixed indentation. Though mostly readable, correct indentation does improve the readability.
  2. There are many instances of magic number usage.
    a. Some register reads and writes were using hard coded register numbers rather than the constants defined in the .h
    b. trxstate used values 0, 1, 2. Replaced by named constants for the states idle, tx and rx.

The indentation was flat for the most part, with several various levels of indent where code had been modified.

I cleaned it with Visual Studio Code's build in C/C++ formatter

I maintained the indent on the #defines between lines 21 & 25 for readability.
Reduce magic number, especial trxstate, and several register peeks and pokes.

Still not perfect, but a bit better.

Fix typo COSTUM -> CUSTOM, 4 instances.
Put API in code block for emphasis
@aodonnell-ca aodonnell-ca marked this pull request as draft February 21, 2024 23:55
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.

1 participant