Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Missing sys.platform on raspberrypi ports #4091

@jamesbowman

Description

@jamesbowman

sys.platform is missing from the raspberrypi ports.

I started to make a PR, with #define MICROPY_PY_SYS_PLATFORM in mpconfigport.h. However, it seems to require some thought. According to the docs for sys.platform:

For baremetal ports it is an identifier of the chip on a board, e.g. "MicroChip SAMD51". It thus can be used to distinguish one board from another.

(This is exactly what I want it for... to distinguish between boards in the Gameduino driver and assign the appropriate default IO pins.)

So it should be different for the raspberry_pi_pico and adafruit_feather_rp2040 boards. Maybe it should be

"Rpi RP2040"
"Adafruit RP2040"

But unsure. Happy to continue the PR with any given scheme.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions