aboutsummaryrefslogtreecommitdiff
path: root/stmhal/readline.c
AgeCommit message (Collapse)Author
2015-01-12stmhal: Move readline code to lib/mp-readline/.Paul Sokolovsky
2015-01-07stmhal: Collect all root pointers together in 1 place.Damien George
A GC in stmhal port now only scans true root pointers, not entire BSS. This reduces base GC time from 1700ms to 900ms.
2015-01-01stmhal: Prefix includes with py/; remove need for -I../py.Damien George
2014-11-27stmhal: Remove unnecessary HAL_Delay in readline loop.Damien George
The reason for having this delay is to reduce power consumption at the REPL (HAL_Delay calls __WFI to idle the CPU). But stdin_rx_chr has a __WFI in it anyway, so this delay call is not needed. By removing this call, the readline input can consume characters much more quickly (before was limited to 1000 chrs/s), and has much reduced dependency on the specific port.
2014-11-27stmhal: Reduce coupling between USB driver and readline.Damien George
This makes it easier to re-use readline.c and pyexec.c from stmhal in other ports.
2014-10-26stmhal: Improve REPL control codes; improve pyboard.py script.Damien George
Improvements are: 2 ctrl-C's are now needed to truly kill running script on pyboard, so make CDC interface allow multiple ctrl-C's through at once (ie sending b'\x03\x03' to pyboard now counts as 2 ctrl-C's). ctrl-C in friendly-repl can now stop multi-line input. In raw-repl mode, use ctrl-D to indicate end of running script, and also end of any error message. Thus, output of raw-repl is always at least 2 ctrl-D's and it's much easier to parse. pyboard.py is now a bit faster, handles exceptions from pyboard better (prints them and exits with exit code 1), prints out the pyboard output while the script is running (instead of waiting till the end), and allows to follow the output of a previous script when run with no arguments.
2014-08-04stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc.Damien George
Make a clearer distinction between init functions that must be done before any scripts can run (xxx_init0) and those that can be safely deferred (xxx_init). Fix bug initialising USB VCP exception. Addresses issue #788. Re-order some init function to improve reliability of reset/soft-reset.
2014-07-20stmhal: Fix REPL printing by cooking output sent to stdout_obj.Damien George
Recent changes to builtin print meant that print was printing to the mp_sys_stdout_obj, which was sending data raw to the USB CDC device. The data should be cooked so that \n turns into \r\n.
2014-07-02Merge branch 'teensy-new' of github.com:dhylands/micropython into ↵Damien George
dhylands-teensy-new Conflicts: stmhal/pin_named_pins.c stmhal/readline.c Renamed HAL_H to MICROPY_HAL_H. Made stmhal/mphal.h which intends to define the generic Micro Python HAL, which in stmhal sits above the ST HAL.
2014-06-28stmhal: Include mpconfig.h before all other includes.Paul Sokolovsky
It defines types used by all other headers. Fixes #691.
2014-06-15Updated teensy to build.Dave Hylands
Refactored some stmhal files which are shared with teensy.
2014-05-10stmhal: Improve handling of out-of-memory in REPL.Damien George
Addresses issue #558, but it's likely that other out-of-memory errors could crash the pyboard. Reason is that qstrs use m_new and can raise an exception within the parser.
2014-05-03Add license header to (almost) all files.Damien George
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
2014-04-05stmhal: Add more escape seqs; add debugging output for escape seq.Damien George
2014-04-05stmhal readline: Parse XTERM Home/End key codes.Paul Sokolovsky
Which are ESC O H, ESC O F.
2014-04-03stmhal: Add home/end cursor support in readline.Damien George
Home/end work in picocom and screen (different codes in those 2 programs). Also, CTRL-A (for non-empty liny) and CTRL-E act as home/end.
2014-04-02stmhal: Add backspace key to readline (along with delete key).Damien George
2014-03-29stmhal: Factor out stdio and readline to separate files.Damien George
Adds readline_init() to clear readline history on soft reset. Addresses issue #387.