upython.h 718 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <cli/cli.h>
  3. #include <furi.h>
  4. #define TAG "uPython"
  5. #define CLI "py"
  6. typedef enum {
  7. ActionNone,
  8. ActionOpen,
  9. ActionRepl,
  10. ActionExec,
  11. ActionExit,
  12. ActionTerm
  13. } Action;
  14. extern FuriString* file_path;
  15. extern volatile Action action;
  16. extern volatile FuriThreadStdoutWriteCallback stdout_callback;
  17. void upython_reset_file_path();
  18. Action upython_splash_screen();
  19. bool upython_confirm_exit_action();
  20. bool upython_select_python_file(FuriString* file_path);
  21. void upython_cli_register(void* args);
  22. void upython_cli_unregister(void* args);
  23. void upython_cli(PipeSide* pipe, FuriString* args, void* ctx);
  24. void upython_repl_execute();
  25. void upython_file_execute(FuriString* file);