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

Late Initialization #11

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

Late Initialization #11

wants to merge 1 commit into from

Conversation

EtherFidelity
Copy link

This change allows the class to be instantiated globally but configured in the setup() section.

@LowPowerLab
Copy link
Owner

Thanks for the pull, can you give an example of how this mod would be useful over using the initialization of the vars in the constructor?

@EtherFidelity
Copy link
Author

This is part of a system I'm working on. I haven't released any code yet
because it's far from finished.

Basically, I have a small circuit configuration program that you, the
manufacturer, could run on your board prior to shipping. It uses a section
of the EEPROM to store pin configuration details for that specific board
model. The idea is that with this program being used to define the circuit
configuration, it could be used with yours and the variety of other boards
out there with additional hardware soldered on such that a user's final
program can read this and use it to initialize the hardware on any board
without the use of build flags or separate code bases.

What do you think? I realize that compiler flags to identify various boards
are easy enough, but this method would eliminate those. This could be nice
because to use a new board design one would need no additional code
modifications.

The EEPROM could just have a simple struct in it that says what each pin is
connected to, if anything. An easy lookup in the setup phase and the late
initialization patch together would make it possible, since that struct
can't be read before the setup phase.

What do you think?

Charles

On Mon, Jun 8, 2015 at 7:44 AM, Felix Rusu [email protected] wrote:

Thanks for the pull, can you give an example of how this mod would be
useful over using the initialization of the vars in the constructor?


Reply to this email directly or view it on GitHub
#11 (comment).

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.

2 participants