summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/esp_mphal.h
Commit message (Collapse)AuthorAge
* extmod/machine_spi: Provide reusable software SPI class.Damien George2016-12-08
| | | | | | So long as a port defines relevant mp_hal_pin_xxx functions (and delay) it can make use of this software SPI class without the need for additional code.
* esp8266: Rename "machine" module implementation to use contemporary naming.Paul Sokolovsky2016-11-06
| | | | | | | Previously they used historical "pyb" affix causing confusion and inconsistency (there's no "pyb" module in modern ports; but people took esp8266 port as an example, and "pyb" naming kept proliferating, while other people complained that source structure is not clear).
* lib/interrupt_char: Factor out typical Ctrl+C handling from esp8266 port.Paul Sokolovsky2016-09-29
| | | | | Utility functions for keyboard interrupt handling, to be reused across (baremetal) ports.
* esp8266/esp_mphal.h: Add mp_hal_ticks_cpu() for reuse.Paul Sokolovsky2016-08-07
|
* esp8266: Enable DHT C-level driver.Damien George2016-05-26
| | | | | Exposed as esp.dht_readinto. Probably should go somewhere less port-specific.
* 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: Add mp_hal_pin_input() and mp_hal_pin_output() functions.Damien George2016-05-26
|
* esp8266/esp_mphal: Handle Ctrl+C from dupterm (e.g. WebREPL).Paul Sokolovsky2016-05-24
|
* esp8266/esp_mphal: Add ets_esf_free_bufs(), etc. functions.Paul Sokolovsky2016-05-03
| | | | Returning free number of various WiFi driver packet buffers.
* esp8266: Change software SPI driver to use general pin HAL.Damien George2016-04-22
|
* 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.
* extmod/machine_i2c: Allow mp_hal_pin_obj_t to be any type, not a ptr.Damien George2016-04-22
|
* 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: Switch from using custom I2C driver to generic extmod one.Damien George2016-04-12
|
* esp8266: Implement basic C-level pin HAL.Damien George2016-04-12
|
* 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: Support synchronous wifi scanning.Damien George2016-03-30
| | | | | | | That is: aps = if0.scan() TODO: make sure that returned list has tuple with values in "standard" order (whatever that standard is).
* 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/esp_mphal: Add higher-level event polling function.Paul Sokolovsky2016-03-11
| | | | ets_event_poll() polls both system events and uPy pending exception.
* esp8266/etshal.h: More prototypes of ESP8266 SDK/BootROM functions.Damien George2016-03-05
|
* 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
|
* all: Add py/mphal.h and use it in all ports.Damien George2015-10-31
| | | | | | py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
* 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: Fix lost chars problem when block-xfering data (e.g., when pasting).Paul Sokolovsky2015-06-01
| | | | | | | | | | | | | Pasting more or less sizable text into ESP8266 REPL leads to random chars missing in the received input. Apparent cause is that using RTOS messages to pass individual chars one by one is to slow and leads to UART FIFO overflow. So, instead of passing chars one by one, use RTOS msg to signal that input data is available in FIFO, and then let task handler to read data directly from FIFO. With this change, lost chars problem is gone, but the pasted text is truncated after some position. At least 500 chars can be pasted reliably (at 115200 baud), but 1K never pastes completely.
* 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: Implement task-based, event-driven interface with UART.Paul Sokolovsky2015-01-16
| | | | | | This enables proper interfacing with underlying OS - MicroPython doesn't run the main loop, OS does, MicroPython just gets called when some event takes place.
* esp8266: New port of Micro Python to ESP8266 wifi module.Damien George2014-11-27