upython.h 648 B

12345678910111213141516171819202122232425262728293031323334
  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 Action action;
  15. extern FuriString* file_path;
  16. void upython_reset_file_path();
  17. Action upython_splash_screen();
  18. bool upython_confirm_exit_action();
  19. bool upython_select_python_file(FuriString* file_path);
  20. void upython_cli_register(void* args);
  21. void upython_cli_unregister(void* args);
  22. void upython_cli(Cli* cli, FuriString* args, void* ctx);
  23. void upython_repl_execute(Cli* cli);
  24. void upython_file_execute(FuriString* file);