Damien George
45f3416816
esp8266: Enable DHT C-level driver.
Exposed as esp.dht_readinto. Probably should go somewhere less
port-specific.
9 years ago
Damien George
48a7ef0576
drivers: Add C-level function to read DHT11 and DHT22 devices.
Uses mp_hal_pin API.
9 years ago
Damien George
4b37e775ea
extmod/machine_i2c: Redo mp_hal_pin macros to use open_drain and od_low.
mp_hal_pin_config_od is renamed mp_hal_pin_open_drain, and mp_hal_pin_low
is mp_hal_pin_od_low.
9 years ago
Damien George
a3dc2c6031
docs/machine: Make disable_irq and enable_irq docs available for all.
9 years ago
Damien George
9a368ae831
esp8266/modmachine: Add disable_irq and enable_irq functions.
9 years ago
Damien George
849eb835f0
esp8266/ets_alt_task: Don't run ets_loop_iter if irqs are disabled.
ets_loop_iter processes pending tasks, and tasks are considered lower
priority than interrupts, so tasks shouldn't be processed if interrupts
are disabled.
9 years ago
Damien George
99b14593a6
esp8266/xtirq: Add xtirq.h for controlling xtensa irqs.
9 years ago
Damien George
7e809b4baf
esp8266/modpybspi: Configure pins when initialising an SPI object.
9 years ago
Damien George
68e222afdc
esp8266: Add mp_hal_pin_input() and mp_hal_pin_output() functions.
9 years ago
Paul Sokolovsky
20aa9c8511
.travis.yml: Install gcc-arm-none-eabi with --force-yes for now.
There appears to be issue signature problem with the PPA package we use,
so workaround it this way for now. Warning: with broken signature, there's
always a possibility that PPA was hacked and ships trojaned binaries.
9 years ago
Paul Sokolovsky
f5d63bcd23
unix: Enable "ussl" module.
ussl was in testing mode for 8 months, and now enabled in other ports
(e.g. esp8266), so time for unix port to catch up.
9 years ago
Paul Sokolovsky
2ea019f3d3
extmod/modussl: Coverage build fixes.
9 years ago
Paul Sokolovsky
37f9761801
unix/Makefile: nanbox build is not compatible with modussl, disable.
9 years ago
Paul Sokolovsky
9d04fec5d9
extmod/modussl: Make more compatible with non-default obj representations.
Still not compatible with nanboxing.
9 years ago
Paul Sokolovsky
c76acd8c23
py/moduerrno: Add EEXIST, EISDIR.
Useful to check file/dir operations result, in particular used by upip.
9 years ago
Paul Sokolovsky
2b05b60bbc
esp8266/esp_mphal: mp_uos_dupterm_deactivate() may raise exception.
So, keep call to it protected via NLR still.
9 years ago
Paul Sokolovsky
4681b86850
esp8266/esp_mphal: Handle Ctrl+C from dupterm (e.g. WebREPL).
9 years ago
Paul Sokolovsky
116eeee6db
esp8266/esp_mphal: Fix NLR buffer leak in call_dupterm_read().
9 years ago
Paul Sokolovsky
bc2ba6b2e3
esp8266/scripts/port_diag: Dump network interface IP settings.
9 years ago
mad474
eaecc4c02e
docs/esp8266/general: Grammar fixes.
9 years ago
Antonin ENFRUN
ca41dc2750
py/objnamedtuple: Allow passing field names as a tuple.
So the documentation's example works. Besides, a tuple can be more
memory efficient.
9 years ago
Damien George
2133924e46
unix: Support frozen packages.
To use, put your directory structure with .py files in frozen/ and then:
make FROZEN_MPY_DIR=frozen
9 years ago
Damien George
202d5acd06
py/makeqstrdata.py: Allow to have double-quote characters in qstrs.
When rendering the qstr for a C header file, the double-quate character
must be escaped.
9 years ago
Damien George
3e03d1b87e
stmhal: Support frozen packages using .mpy files.
See issue #1814 .
9 years ago
Damien George
25a42fb6ef
tools/mpy-tool.py: Don't strip directories from the frozen source name.
Directories are now supported by the frozen import system (to implement
frozen packages) so we should keep them.
9 years ago
Damien George
74fb4e795b
mpy-cross: Add -s option to specify the embedded source filename.
.mpy files contain the name of the source file that they were compiled
from. This patch adds a way to change this name to an arbitrary string,
specified on the command line with the -s option. The default is to use
the full name of the input filename.
This new -s option is useful to strip off a leading directory name so
that mpy-tool.py can freeze packages.
9 years ago
Damien George
9b4c013823
tools/mpy-tool.py: Include .py extension in frozen filename.
So that it can be correctly stat'd when looking for frozen files.
9 years ago
Damien George
274952a117
py: Allow to stat and import frozen mpy files using new frozen "VFS".
Freezing mpy files using mpy-tool.py now works again.
9 years ago
Paul Sokolovsky
3e33aeb0db
docs: esp8266: Include ussl module in the docs.
9 years ago
Paul Sokolovsky
bca4c9e465
docs/ussl: Add basic description of axTLS-based modussl.
In particular, disclose the fact that server certificates are not
validated.
9 years ago
Paul Sokolovsky
cb7693bab4
esp8266/main: Update _boot module loading for recent frozen modules refactors.
9 years ago
Paul Sokolovsky
9c2217a165
esp8266: Enable collections.OrderedDict.
9 years ago
Paul Sokolovsky
9dde6062cc
py/objstr: Fix mix-signed comparison in str.center().
9 years ago
Dave Hylands
6a60fb3cf4
py/objstr*: Properly ifdef str.center().
9 years ago
Paul Sokolovsky
53bac8e869
tests: Add testcase for str.center().
9 years ago
Paul Sokolovsky
1b5abfcaae
py/objstr: Implement str.center().
Disabled by default, enabled in unix port. Need for this method easily
pops up when working with text UI/reporting, and coding workalike
manually again and again counter-productive.
9 years ago
Paul Sokolovsky
2c573f00b8
py/builtinimport: Unbreak bare-arm build.
9 years ago
Paul Sokolovsky
8a2970e136
py/builtinimport: Unbreak minimal build.
These are workarounds required until frozen .mpy loading following standard
frozen modules code path.
9 years ago
Paul Sokolovsky
daa4793578
tools/make-frozen: Update for latest changes in frozen modules support.
Frozen modules are now stored with extensions and with '/' as path
separator. In other words, frozen modules paths stored as they are
in normal filesystem.
9 years ago
Paul Sokolovsky
fb742cdc12
py/{builtinimport,frozenmod}: Rework frozen modules support to support packages.
Now frozen modules is treated just as a kind of VFS, and all operations
performed on it correspond to operations on normal filesystem. This allows
to support packages properly, and potentially also data files.
This change also have changes to rework frozen bytecode modules support to
use the same framework, but it's not finished (and actually may not work,
as older adhox handling of any type of frozen modules is removed).
9 years ago
Paul Sokolovsky
b580958216
unix/unix_mphal: Implement mp_hal_ticks_us().
Similar to existing mp_hal_ticks_ms().
9 years ago
Paul Sokolovsky
5a2a4e9452
py/mphal.h: Provide default prototypes for mp_hal_delay_us/mp_hal_ticks_us.
Similar to existing mp_hal_delay_ms/mp_hal_ticks_ms.
9 years ago
Paul Sokolovsky
0ab372585f
extmod/moduos_dupterm: Dumpterm subsystem is responsible for closing stream.
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).
9 years ago
Paul Sokolovsky
3a29db8e58
extmod/modwebrepl: Add close() method.
9 years ago
Paul Sokolovsky
ccf4e5ab7b
extmod/modwebsocket: Add close() method.
9 years ago
Paul Sokolovsky
497660fcda
py/stream: Add mp_stream_close() helper function.
9 years ago
Damien George
f9dc644017
extmod: When including extmod headers, prefix path with extmod/.
9 years ago
Damien George
3ff16ff52e
py: Declare constant data as properly constant.
Otherwise some compilers (eg without optimisation) will put this read-only
data in RAM instead of ROM.
9 years ago
misterdanb
a0a08b4be1
esp8266: Add APA102 serial individually controllable LEDs support.
APA102 is a new "smart LED", similar to WS2812 aka "Neopixel".
9 years ago
Torwag
6fa60153ea
esp8266/README: Add a very first start section.
Adding a very first start section to get people going after flashing.
I tried to condense it to a minimum to avoid as much as possible
redundancy and bloating.
9 years ago