diff options
Diffstat (limited to 'stmhal')
-rw-r--r-- | stmhal/main.c | 4 | ||||
-rw-r--r-- | stmhal/pybstdio.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/stmhal/main.c b/stmhal/main.c index 4f5277975b..2134e94fdf 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -569,6 +569,10 @@ soft_reset: goto soft_reset; } +/// \moduleref sys +/// \function exit([retval]) +/// Raise a `SystemExit` exception. If an argument is given, it is the +/// value given to `SystemExit`. STATIC NORETURN mp_obj_t mp_sys_exit(uint n_args, const mp_obj_t *args) { int rc = 0; if (n_args > 0) { diff --git a/stmhal/pybstdio.c b/stmhal/pybstdio.c index 2121a6cbb7..b7756d63ea 100644 --- a/stmhal/pybstdio.c +++ b/stmhal/pybstdio.c @@ -177,6 +177,10 @@ STATIC const mp_obj_type_t stdio_obj_type = { .locals_dict = (mp_obj_t)&stdio_locals_dict, }; +/// \moduleref sys +/// \constant stdin - standard input (connected to USB VCP, and optional UART object) +/// \constant stdout - standard output (connected to USB VCP, and optional UART object) +/// \constant stderr - standard error (connected to USB VCP, and optional UART object) const pyb_stdio_obj_t mp_sys_stdin_obj = {{&stdio_obj_type}, .fd = STDIO_FD_IN}; const pyb_stdio_obj_t mp_sys_stdout_obj = {{&stdio_obj_type}, .fd = STDIO_FD_OUT}; const pyb_stdio_obj_t mp_sys_stderr_obj = {{&stdio_obj_type}, .fd = STDIO_FD_ERR}; |