PythonExtra/ports/sh/mphalport.c
Lephenixnoir fa6aa00dae
pe: basic GUI setup
Adds a file browser (selected files are not loaded yet) and a shell
widget with an input system that is still better than the previous
VT-100 emulation scheme (with locked modifiers mainly).

A lot of small things still need to be done to make the UI functional.
2022-11-05 18:25:54 +01:00

28 lines
844 B
C

//---------------------------------------------------------------------------//
// ____ PythonExtra //
//.-'`_ o `;__, A community port of MicroPython for CASIO calculators. //
//.-'` `---` ' License: MIT (except some files; see LICENSE) //
//---------------------------------------------------------------------------//
#include "py/mphal.h"
#include "console.h"
#include <gint/display.h>
#include <gint/keyboard.h>
#include <unistd.h>
int mp_hal_stdin_rx_chr(void)
{
while(1) {
key_event_t ev = getkey();
int code_point = console_key_event_to_char(ev);
if(code_point != 0)
return code_point;
}
}
void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len)
{
int r = write(STDOUT_FILENO, str, len);
(void)r;
}