Closed brandonbraun653 closed 4 years ago
This ticket is a bit of a non-starter because in order to read external peripheral configuration data, you have to first know how to configure the peripherals that read that data. It's a chicken and egg problem.
Chimera derives a lot of its flexibility from being able to easily reconfigure peripherals and decouple the user from hardware specific settings. These settings must be stored somewhere and previously a LightFlatMap was typically used to map the high level options into hardware register values. Unfortunately, this does not scale well to data that is constant, and the LightFlatMap tends to consume an undesirable amount of RAM.
It would be beneficial to provide an interface that accesses const configuration data on a per-peripheral basis. It may be difficult to abstract away some of the specific info. Perhaps have a long list of enums that decay into a lookup table. The main idea is that if a piece of config data is needed, the API will be used to access it. This allows storage of the data to exist in on-chip flash or on external flash without the client code having to care.