Skip to content

Refactor STM32 classes to be more like Samd21 #103

Closed
@terrillmoore

Description

@terrillmoore

Samd21 classes use an elaborate technique to avoid conditional compiles, based on the C compiler's ability to optimize out globals that aren't used.

  1. The table of platforms contains all the known platforms.
  2. The actual class Catena4450, etc., has a getPlatformTable() method that returns the platforms supported by the device.
  3. Startup code calls that as needed.
  4. Other platforms in the vector aren't referenced, so they're discarded.

STM32 classes instead have a table that's constructed with #if. This is much more fragile.

Please refactor the Stm32 classes to use the Samd21 technique.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions