diff options
author | Damien George <damien@micropython.org> | 2022-04-26 17:28:39 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-04-28 17:23:03 +1000 |
commit | 402df833fe6da5233c83c58421e81493cda54f67 (patch) | |
tree | c56176da71b30711764decc5068fdb8ea9376c4d /shared | |
parent | 59c5d4161120db28bc6cbc7653f2e7fdb4a87370 (diff) |
py/modsys: Introduce sys.implementation._machine constant.
This contains a string useful for identifying the underlying machine. This
string is kept consistent with the second part of the REPL banner via the
new config option MICROPY_BANNER_MACHINE.
This makes os.uname() more or less redundant, as all the information in
os.uname() is now available in the sys module.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'shared')
-rw-r--r-- | shared/runtime/pyexec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/shared/runtime/pyexec.c b/shared/runtime/pyexec.c index eabf2f567..2763319c0 100644 --- a/shared/runtime/pyexec.c +++ b/shared/runtime/pyexec.c @@ -402,7 +402,8 @@ STATIC int pyexec_friendly_repl_process_char(int c) { // reset friendly REPL mp_hal_stdout_tx_str("\r\n"); mp_hal_stdout_tx_str(MICROPY_BANNER_NAME_AND_VERSION); - mp_hal_stdout_tx_str("; " MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME "\r\n"); + mp_hal_stdout_tx_str("; " MICROPY_BANNER_MACHINE); + mp_hal_stdout_tx_str("\r\n"); #if MICROPY_PY_BUILTINS_HELP mp_hal_stdout_tx_str("Type \"help()\" for more information.\r\n"); #endif @@ -554,7 +555,8 @@ int pyexec_friendly_repl(void) { friendly_repl_reset: mp_hal_stdout_tx_str(MICROPY_BANNER_NAME_AND_VERSION); - mp_hal_stdout_tx_str("; " MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME "\r\n"); + mp_hal_stdout_tx_str("; " MICROPY_BANNER_MACHINE); + mp_hal_stdout_tx_str("\r\n"); #if MICROPY_PY_BUILTINS_HELP mp_hal_stdout_tx_str("Type \"help()\" for more information.\r\n"); #endif |