Commit Graph

26 Commits

Author SHA1 Message Date
Damien George
4ec803a42a all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros. 2017-08-21 21:34:23 +10:00
Damien George
d91c1170ca zephyr: Remove long-obsolete machine_ptr_t typedef's. 2017-07-17 15:17:06 +10:00
Paul Sokolovsky
4352b944d2 zephyr: Define MICROPY_PY_SYS_PLATFORM (to "zephyr"). 2017-06-08 17:58:55 +03:00
Paul Sokolovsky
b5159a9149 zephyr/mpconfigport.h: Enable line number information for scripts. 2017-05-02 23:33:16 +03:00
Paul Sokolovsky
0a88b44248 zephyr/machine_pin: Implement pin protocol for machine.Signal support. 2017-04-08 14:27:36 +03:00
Paul Sokolovsky
cf70f9a474 zephyr/mpconfigport.h: Fix build if usocket module is disabled. 2017-04-08 00:38:51 +03:00
Damien George
4c307bfba1 all: Move BYTES_PER_WORD definition from ports to py/mpconfig.h
It can still be overwritten by a port in mpconfigport.h but for almost
all cases one can use the provided default.
2017-04-01 11:39:38 +11:00
Paul Sokolovsky
6cc1a7a214 zephyr: Integrate modusocket into build. 2017-03-31 00:06:31 +03:00
Paul Sokolovsky
99866a00a0 py/nlrx86: Better check for Zephyr (requires 1.7). 2017-03-26 00:33:23 +03:00
Paul Sokolovsky
a64a0276b3 zephyr/modzephyr: Add a module for Zephyr-specific things.
Mostly intended to ease experimentation, no particular plans for APIs
so far (far less their stability), is_preempt_thread() provided is
mostly an example.
2017-03-08 08:55:50 +01:00
Damien George
77e0cee49e zephyr: Convert to use builtin help function. 2017-01-22 11:56:16 +11:00
Paul Sokolovsky
bbd0d27a25 zephyr: Enable slice subscription.
Required for the testsuite.
2016-12-18 21:52:52 +03:00
Paul Sokolovsky
0c59c30fde zephyr: Use core-provided keyboard exception object. 2016-12-16 01:07:28 +03:00
Paul Sokolovsky
688cc79294 zephyr/Makefile: Allow to adjust heap size from make command line. 2016-11-04 19:09:39 +03:00
Paul Sokolovsky
13f7a7b86b zephyr/mpconfigport.h: Move less important params to the bottom. 2016-11-04 18:56:04 +03:00
Paul Sokolovsky
938c693948 zephyr: Support time -> utime module "weaklink".
So, now it's possible to just do normal Python's "import time".
2016-10-28 21:38:52 +03:00
Daniel Thompson
67b6d9d499 zephyr: Initial implementation of machine.Pin.
The integration with Zephyr is fairly clean but as MicroPython Hardware API
requires pin ID to be a single value, but Zephyr operates GPIO in terms of
ports and pins, not just pins, a "hierarchical" ID is required, using tuple
of (port, pin). Port is a string, effectively a device name of a GPIO port,
per Zephyr conventions these are "GPIO_0", "GPIO_1", etc.; pin is integer
number of pin with the port (supposed to be in range 0-31).

Example of pin initialization:

pin = Pin(("GPIO_1", 21), Pin.OUT)

(an LED on FRDM-K64F's Port B, Pin 21).

There is support for in/out pins and pull up/pull down but currently
there is no interrupt support.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-10-27 00:47:26 +03:00
Vincenzo Frascino
a3519332b6 zephyr: Use board/SoC values for startup banner based on Zephyr config.
This patch modifies the HW macro definition in order to let micropython
report correctly the BOARD and the SOC on which it is working on.
2016-10-26 19:00:16 +03:00
Daniel Thompson
479b961d39 zephyr: Implement utime module.
This provides time and sleep together with the usual ticks_us/_ms/_diff
and sleep_us/ms family.

We also provide access to Zephyr's high precision timer as ticks_cpu().

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-10-22 20:15:26 +03:00
Paul Sokolovsky
f17f3314d0 zephyr: Add copyright blurbs. 2016-10-12 22:51:17 +03:00
Paul Sokolovsky
1a01ed0d2a zephyr/mpconfigport.h: Fix rebasing artifacts. 2016-10-12 19:42:55 +03:00
Daniel Thompson
b6a544b917 zephyr: Implement the help() function.
The boot issue text mentions a help() function and encourages
the user to run it. It is very disconcerting to find that the
function does not exist...

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-10-12 19:31:39 +03:00
Paul Sokolovsky
93c76d2b06 zephyr: Add Ctrl+C handling. 2016-10-10 23:02:51 +03:00
Paul Sokolovsky
7e3b21ec54 zephyr: Enable frozen modules support. 2016-10-10 21:40:08 +03:00
Paul Sokolovsky
b3a65791b1 zephyr: Enable stack checking and micropython.mem_info(). 2016-10-10 21:36:38 +03:00
Paul Sokolovsky
cff9f02cd7 zephyr: Initial Zephyr RTOS port, MicroPython part. 2016-10-10 01:35:14 +03:00