mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 11:40:18 +01:00
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>
This commit is contained in:
committed by
Damien George
parent
2327972947
commit
c224e976f7
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user