Skip to content

Provide a #define to enable or disable each native module #1434

@dhalbert

Description

@dhalbert

In mpconfig.h, use #define's to enable or disable each native module. These can then be enabled/disabled by port or board, instead of the hodgepodge of #define's that we have now (e.g. PIRKEY_M0, etc.).

For example, create CIRCUITPY_BUSIO, CIRCUITPY_ANALOGIO, etc.

Once this has been done, we can also refactor all the xxx_reset() operations so they are done at the module level. So for instance in port.c or even main.c we can do

#if CIRCUITPY_BUSIO
    busio_reset()
#endif 

busio_reset() would be defined in common-hal/busio/__init__.c and would call i2c_reset(), spi_reset(), etc. as necessary.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions