diff options
| author | Alessandro Gatti <a.gatti@frob.it> | 2024-06-12 07:58:02 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-09-11 11:58:29 +1000 |
| commit | c224e976f733657058b2c10270470edb9c0657dc (patch) | |
| tree | 4aad6dad44dd313241a34543acd4881627bd705b /docs/library | |
| parent | 2327972947d6f5119ec13a95139fff090351c132 (diff) | |
extmod/modplatform: Expose CPU features/extensions.
This adds the ability to expose CPU-specific features/extensions to
scripts when the `platform` module is compiled in, by implementing
`platform.processor()`. Right now this is only available on
bare-metal RV32 and RV64.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'docs/library')
| -rw-r--r-- | docs/library/platform.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/library/platform.rst b/docs/library/platform.rst index c091477d8..c19ef0f5d 100644 --- a/docs/library/platform.rst +++ b/docs/library/platform.rst @@ -36,3 +36,11 @@ Functions Returns a tuple of strings *(lib, version)*, where *lib* is the name of the libc that MicroPython is linked to, and *version* the corresponding version of this libc. + +.. function:: processor() + + Returns a string with a detailed name of the processor, if one is available. + If no name for the processor is known, it will return an empty string + instead. + + This is currently available only on RISC-V targets (both 32 and 64 bits). |
