You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched for similar issues and found none was relevant.
Introduce the issue
The hardware is initialized in many places, controller classes, drivers, systemtask, displayapp. Keeping track of the hardware state can be difficult. What has been initialized and when. We need to define how and where the hardware should be initialized, and how info about the hardware, such as pins, is passed to the controller classes.
For example, we could have a port init function, that initializes all hardware. The already configured pins could be passed to the controller classes. We could apply a discipline to only include hardware specific files in certain places.
Version
No response
The text was updated successfully, but these errors were encountered:
This is indeed something I tried to do in #1387 : implement all the hardware specific code at a single place, and ensure that all hardware specific code is correctly encapsulated so that all the application code in InfiniTime do not have to worry about the hardware details.
I tried to do all of this at once in #1387, but this is a big task. As you suggested, we could start by adding those port init functions to support various PineTime variants (such as the P8) could be a good start.
So in the project, there would be a 'ports' folder that contains all the init code for the supported hardware, and the specific port file would be selected by CMake during the project generation.
Verification
Introduce the issue
The hardware is initialized in many places, controller classes, drivers, systemtask, displayapp. Keeping track of the hardware state can be difficult. What has been initialized and when. We need to define how and where the hardware should be initialized, and how info about the hardware, such as pins, is passed to the controller classes.
Relates to #1387 #1050 #1468
Preferred solution
For example, we could have a port init function, that initializes all hardware. The already configured pins could be passed to the controller classes. We could apply a discipline to only include hardware specific files in certain places.
Version
No response
The text was updated successfully, but these errors were encountered: