summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/esp_mphal.c
Commit message (Collapse)AuthorAge
* esp8266/esp_mphal: Implement libc's errno.Paul Sokolovsky2016-07-31
| | | | | | Using __errno() function, and redirect it to use mp_stream_errno from stream module. This is pre-requisite for integrating with 3rd-party libs, like BerkeleyDB.
* esp8266/esp_mphal: Properly handle dupterm EOF after switching to readinto().Paul Sokolovsky2016-07-05
|
* esp8266/esp_mphal: call_dupterm_read: Use readinto() method.Paul Sokolovsky2016-07-04
| | | | | It's memory fragmentation hazard to allocate 1-char string each time by calling read() method.
* extmod/machine_i2c: Redo mp_hal_pin macros to use open_drain and od_low.Damien George2016-05-26
| | | | | mp_hal_pin_config_od is renamed mp_hal_pin_open_drain, and mp_hal_pin_low is mp_hal_pin_od_low.
* esp8266/esp_mphal: mp_uos_dupterm_deactivate() may raise exception.Paul Sokolovsky2016-05-24
| | | | So, keep call to it protected via NLR still.
* esp8266/esp_mphal: Handle Ctrl+C from dupterm (e.g. WebREPL).Paul Sokolovsky2016-05-24
|
* esp8266/esp_mphal: Fix NLR buffer leak in call_dupterm_read().Paul Sokolovsky2016-05-24
|
* extmod/moduos_dupterm: Dumpterm subsystem is responsible for closing stream.Paul Sokolovsky2016-05-20
| | | | | | | | Make dupterm subsystem close a term stream object when EOF or error occurs. There's no other party than dupterm itself in a better position to do this, and this is required to properly reclaim stream resources, especially if multiple dupterm sessions may be established (e.g. as networking connections).
* esp8266/esp_mphal: Add ets_esf_free_bufs(), etc. functions.Paul Sokolovsky2016-05-03
| | | | Returning free number of various WiFi driver packet buffers.
* esp8266: Allow GPIO16 to be used as a pin in the uPy pin HAL.Damien George2016-04-22
| | | | Now I2C works with GPIO16 as the SCL or SDA pin.
* esp8266: Convert mp_hal_pin_obj_t from pin ptr to simple integer.Damien George2016-04-22
| | | | | | | | | Most pin I/O can be done just knowing the pin number as a simple integer, and it's more efficient this way (code size, speed) because it doesn't require a memory lookup to get the pin id from the pin object. If the full pin object is needed then it can be easily looked up in the pin table.
* esp8266/esp_mphal: Remove mp_hal_feed_watchdog.Damien George2016-04-21
| | | | | It doesn't do anything and is not needed. ets_loop_iter/ets_event_poll now take care of feeding the WDT.
* esp8266/esp_mphal: Protect dupterm_task_handler() from recursive exec.Paul Sokolovsky2016-04-17
|
* esp8266/esp_mphal: call_dupterm_read(): Fix order of deactivating on EOF.Paul Sokolovsky2016-04-13
| | | | First deactivate, then print diagnostic message.
* esp8266/esp_mphal: Don't swallow exceptions in dupterm's read()/write().Paul Sokolovsky2016-04-13
| | | | | | | The idea is that if dupterm object can handle exceptions, it will handle them itself. Otherwise, object state can be compromised and it's better to terminate dupterm session. For example, disconnected socket will keep throwing exceptions and dump messages about that.
* esp8266: Support dedicated REPL loop (aka pull-style).Paul Sokolovsky2016-04-01
| | | | | | | | Event-driven loop (push-style) is still supported and default (controlled by MICROPY_REPL_EVENT_DRIVEN setting, as expected). Dedicated loop worked even without adding ets_loop_iter(), though that needs to be revisited later.
* esp8266: Implement input part of dupterm handling.Paul Sokolovsky2016-03-31
| | | | | | | | The idea is following: underlying interrupt-driven or push-style data source signals that more data is available for dupterm processing via call to mp_hal_signal_dupterm_input(). This triggers a task which pumps data between actual dupterm object (which may perform additional processing on data from low-level data source) and input ring buffer.
* esp8266: Switch back to accumulating input data via ring buffer.Paul Sokolovsky2016-03-30
| | | | | | | | But now it's generic ring buffer implemented via ringbuf.h, and is intended for any type of input, including dupterm's, not just UART. The general process work like this: an interrupt-driven input source puts data into input_buf, and then signals new data available via call to mp_hal_signal_input().
* esp8266/esp_mphal: Add support for debug UART-only output.Paul Sokolovsky2016-03-29
| | | | | | | | | Helpful when debugging dupterm support (because otherwise all output is spooled to dupterm too). To use: mp_printf(&mp_debug_print, "...");
* esp8266: Add basic support for duplicating REPL output.Paul Sokolovsky2016-03-29
|
* esp8266: Make mp_hal_delay_us work with new event framework.Damien George2016-03-23
|
* esp8266/esp_mphal: Add higher-level event polling function.Paul Sokolovsky2016-03-11
| | | | ets_event_poll() polls both system events and uPy pending exception.
* esp8266: Support raising KeyboardInterrupt on Ctrl+C.Paul Sokolovsky2016-03-05
|
* esp8266: Add custom _assert() function.Paul Sokolovsky2016-03-05
| | | | | | Enabling standard assert() (by removing -DNDEBUG) produces non-bootable binary (because all messages go to .rodata which silently overflows). So, for once-off debugging, have a custom _assert().
* esp8266: Reset "virtual RTC" on power on.Paul Sokolovsky2016-03-04
| | | | | | | | | Initialize RTC period coefficients, etc. if RTC RAM doesn't contain valid values. time.time() then will return number of seconds since power-on, unless set to different timebase. This reuses MEM_MAGIC for the purpose beyond its initial purpose (but the whole modpybrtc.c need to be eventually reworked completely anyway).
* esp8266: Add mp_hal_delay_us function.Damien George2016-03-04
|
* esp8266: Switch to standard mp_hal_ticks_ms() MPHAL function.Paul Sokolovsky2015-10-29
|
* esp8266: Switch to standard mp_hal_delay_ms() MPHAL function.Paul Sokolovsky2015-10-29
|
* esp8266: Switch to standard mp_hal_delay_us() MPHAL function.Paul Sokolovsky2015-10-29
|
* esp8266: Enable setting CPU frequency to 160MHzJosef Gajdusek2015-05-28
|
* esp8266: Implement time functionsJosef Gajdusek2015-05-12
|
* stmhal: Make pybstdio usable by other ports, and use it.Damien George2015-02-13
| | | | | Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
* esp8266: New port of Micro Python to ESP8266 wifi module.Damien George2014-11-27