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

GB minor optimizations #1055

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gemarcano
Copy link
Contributor

  • Moves some pin initialization that's used by a bunch of different code-paths into one function

This is marked as a draft because I have one question. I have the following comment in the code at the moment:

 /* FIXME setup_GB sets this up too. Should this also for Datel and others?
  // Set Audio-In(PH4) to Input
  DDRH &= ~(1 << 4);
  // Enable Internal Pullup
  PORTH |= (1 << 4);
  */

The main setup_GB function also sets up Audio-In as input and enables the internal pull up, but the Datel/Pelican/Codebreaker/MonsterBrain initialization did everything else except touch this pin. Was that intentional? Or should this pin be initialized also as input for those other devices? Right now I don't see them using that pin, so it's probably just holding whatever setting was there prior.

If the answer is that there is no harm in all of them also initializing Audio-In, then I can do that and remove some extra lines from setup_GB. If not, I can remove the FIXMEs currently in the commit.

 - Move shared GB port initialization into its own function
@gemarcano gemarcano force-pushed the gb_minor_optimizations branch from bbab8a6 to d2b9a5d Compare December 23, 2024 20:26
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