Glenn Ruben Bakke
eaece2734b
nrf5: Updating makefile to compile in pwm.c and hal_pwm.c
2016-12-16 19:56:12 +01:00
Glenn Ruben Bakke
36a232182a
nrf5/boards: Adding config flag for HAL_PWM in pca10040 and pca10056.
2016-12-16 19:56:00 +01:00
Glenn Ruben Bakke
930112753a
nrf5: Adding pwm work in progress machine PWM module.
2016-12-16 19:55:32 +01:00
Glenn Ruben Bakke
82f7fe88b0
nrf5/hal: Starting implementation of PWM hal to be used by PWM python module later.
2016-12-16 19:17:42 +01:00
Glenn Ruben Bakke
90730787f3
nrf5: Adding initial board files for pca10056. The files are not complete (only 32 pins are added for now). UART REPL, leds, and Pins (up to 31) are functional.
2016-12-13 21:38:39 +01:00
Glenn Ruben Bakke
bc1aa84cac
nrf5: Updating comment in linker script for nrf52832 and nrf52840 to distinguish between the two nrf52 variants.
2016-12-13 21:35:15 +01:00
Glenn Ruben Bakke
faa460ae88
nrf5: Adding new linker script for nrf52840.
2016-12-13 21:32:40 +01:00
Glenn Ruben Bakke
1a1f9b0c9d
nrf5: updating flash size comment in nrf52832 linker script.
2016-12-13 21:31:39 +01:00
Glenn Ruben Bakke
4344d41b36
lib/netutils: Adding some basic parsing and formating of ipv6 address strings. Only working with full length ipv6 strings. Short forms not supported at the moment (for example FE80::1, needs to be expressed as FE80:0000:0000:0000:0000:0000:0000:0001).
2016-12-13 20:32:54 +01:00
Glenn Ruben Bakke
d7dc0b789d
nrf5: Updating port with new content. SPI, SDcard (trough sdcard.py), Pin, and machine module. Also adding some basic modules depending on SDK and bluetooth stack from nordic semiconductor. NUS is module copied from original port by tralamazza, and new basic module for 6lowpan over BLE which can be used by modnetwork and modusocket. Basic BLE module to enable bluetooth stack and start a eddystone advertisment is kept, and still works without SDK, even if in the SDK folder (its placed there as it needs bluetooth stack from an SDK).
2016-12-13 20:27:26 +01:00
Glenn Ruben Bakke
227998f9cd
Renaming softdevice folder to sdk.
2016-12-13 20:14:48 +01:00
Glenn Ruben Bakke
ea75d9919f
Removing unused 'NRF_SOFTDEVICE' compile variable from all board .mk softdevice targets.
2016-11-17 00:33:37 +01:00
Glenn Ruben Bakke
60686a3b75
Fixing main Makefile CFLAGS concatination error when setting softdevice param
2016-11-17 00:29:16 +01:00
Daniel Tralamazza
839d04f768
ignore default build folders
2016-11-16 23:40:38 +01:00
Daniel Tralamazza
3e31d31f3e
move softdevice (SD) specific code from the main Makefile to their respective board/SD makefiles
2016-11-16 23:40:38 +01:00
Glenn Ruben Bakke
ae99d95c1a
Updating Makefile by removing unwanted LDFLAG setting cpu to cortex-m0 in all cases.
2016-11-16 22:51:53 +01:00
Glenn Ruben Bakke
0ab5ef426b
Updating modble.c method doc of address_print() to reflect the actual function name.
2016-11-16 21:45:34 +01:00
Glenn Ruben Bakke
70956ea969
Base support for nrf51 and nrf52 base without depending on SDK. SoftDevice usage optional.
2016-11-16 21:38:25 +01:00
Daniel Tralamazza
4f7b5eab7f
remove dup declaration mp_builtin_open_obj
2016-11-03 18:42:54 +01:00
Daniel Tralamazza
28769f2609
init
2016-11-01 00:42:22 +01:00
Paul Sokolovsky
805f7ea2f2
docs/utime: Add docs for ticks_add(), improvements for other ticks_*().
2016-11-01 00:14:12 +03:00
Paul Sokolovsky
8679d9e6a6
docs/utime: Remove only:: for ticks_diff().
...
It's mandatory function which should be present in every port. Even if
it's not, in the stdlib intro we waarn users that a particular port can
lack anything of described in the docs.
2016-11-01 00:03:40 +03:00
Pavol Rusnak
7ffc959c00
py: remove asserts that are always true in emitbc.c
2016-10-31 23:21:22 +03:00
Pavol Rusnak
3679ee9b52
py: fix null pointer dereference in mpz.c, fix missing va_end in warning.c
2016-10-31 23:21:15 +03:00
Paul Sokolovsky
e377f3cb40
esp8266/modnetwork: config(): Fix copy-paste error in setting "mac".
2016-10-31 00:30:26 +03:00
Paul Sokolovsky
d60ad5cf53
docs/utime: Describe new semantics of ticks_diff() (signed ring arithmetics).
2016-10-31 00:17:56 +03:00
Paul Sokolovsky
153665f159
docs/utime: Document ticks_cpu() in more detail.
...
Also, drop ::only directive.
2016-10-30 23:15:28 +03:00
Paul Sokolovsky
7219a18d17
docs/library/index: Update TOCs so builtins sorted before modules.
2016-10-30 23:13:52 +03:00
Paul Sokolovsky
796b720dbc
tools/tinytest-codegen: Exclude ticks_diff test for qemu-arm port.
2016-10-30 22:24:07 +03:00
Paul Sokolovsky
be6a765c69
tests/extmod/ticks_diff: Test for new semantics of ticks_diff().
2016-10-30 21:33:12 +03:00
Fabio Utzig
8908e505ce
py/sequence: Fix reverse slicing of lists.
2016-10-30 15:54:19 -02:00
Paul Sokolovsky
e429daa572
extmod/utime_mphal: Fix implementation of new semantics of ticks_diff().
...
Now the function properly uses ring arithmetic to return signed value
in range (inclusive):
[-MICROPY_PY_UTIME_TICKS_PERIOD/2, MICROPY_PY_UTIME_TICKS_PERIOD/2-1].
That means that function can properly process 2 time values away from
each other within MICROPY_PY_UTIME_TICKS_PERIOD/2 ticks, but away in
both directions. For example, if tick value 'a' predates tick value 'b',
ticks_diff(a, b) will return negative value, and positive value otherwise.
But at positive value of MICROPY_PY_UTIME_TICKS_PERIOD/2-1, the result
of the function will wrap around to negative -MICROPY_PY_UTIME_TICKS_PERIOD/2,
in other words, if a follows b in more than MICROPY_PY_UTIME_TICKS_PERIOD/2 - 1
ticks, the function will "consider" a to actually predate b.
2016-10-30 03:07:22 +03:00
Paul Sokolovsky
76146b3d9a
extmod/utime_mphal: Allow ticks functions period be configurable by a port.
...
Using MICROPY_PY_UTIME_TICKS_PERIOD config var.
2016-10-30 03:02:07 +03:00
Paul Sokolovsky
1ba4db5685
tests/btree1: Fix out of memory error running on esp8266.
2016-10-29 19:53:31 +03:00
Paul Sokolovsky
64c6bdb8ee
esp8266/modutime: Consistently convert to MP_ROM_QSTR/MP_ROM_PTR.
2016-10-29 18:48:04 +03:00
Paul Sokolovsky
369233105b
stmhal/modutime: Consistently convert to MP_ROM_QSTR/MP_ROM_PTR.
2016-10-29 17:46:47 +03:00
Paul Sokolovsky
d86cac4b82
extmod/utime_mphal: Implement ticks_add(), add to all maintained ports.
2016-10-29 17:30:05 +03:00
Paul Sokolovsky
c62679bdaa
unix/mphalport.h: Add dummy definition of mp_hal_ticks_cpu().
...
To fix coverage build.
2016-10-29 17:23:05 +03:00
Paul Sokolovsky
6a2c6098f4
windows: Enable utime_mphal following unix, define mp_hal_ticks_*.
...
mp_hal_ticks_ms, mp_hal_ticks_us taken from unix port, mp_hal_ticks_cpu
dummy.
2016-10-29 14:32:15 +03:00
Paul Sokolovsky
3cc87b1e2a
unix/modtime: Switch ticks/sleep_ms/us() to utime_mphal.
2016-10-29 14:17:02 +03:00
Paul Sokolovsky
6a87084019
extmod/utime_mphal: Add MP_THREAD_GIL_EXIT/ENTER warppers for sleep functions.
...
Ported from unix port.
2016-10-29 13:42:36 +03:00
Paul Sokolovsky
99ed0f25cb
unix/mphalport.h: Add warning of mp_hal_delay_ms() implementation.
...
It's implemented in terms of usleep(), and POSIX doesn't guarantee that
usleep() can sleep for more than a second. This restriction unlikely
applies to any real-world system, but...
2016-10-29 13:38:02 +03:00
Paul Sokolovsky
6ed5583f8c
extmod/utime_mphal: ticks_diff(): switch arg order, return signed value.
...
Based on the earlier discussed RFC. Practice showed that the most natural
order for arguments corresponds to mathematical subtraction:
ticks_diff(x, y) <=> x - y
Also, practice showed that in real life, it's hard to order events by time
of occurance a priori, events tend to miss deadlines, etc. and the expected
order breaks. And then there's a need to detect such cases. And ticks_diff
can be used exactly for this purpose, if it returns a signed, instead of
unsigned, value. E.g. if x is scheduled time for event, and y is the current
time, then if ticks_diff(x, y) < 0 then event has missed a deadline (and e.g.
needs to executed ASAP or skipped). Returning in this case a large unsigned
number (like ticks_diff behaved previously) doesn't make sense, and such
"large unsigned number" can't be reliably detected per our definition of
ticks_* function (we don't expose to user level maximum value, it can be
anything, relatively small or relatively large).
2016-10-29 05:02:24 +03:00
Paul Sokolovsky
e381efed4a
unix/modtime: Use ticks_diff() implementation from extmod/utime_mphal.c.
2016-10-29 04:58:06 +03:00
Paul Sokolovsky
aee6483536
zephyr/README: Update for the current featureset, add more info.
2016-10-28 21:51:18 +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
Alex March
cc0cc67815
tests/extmod/uhashlib_sha256: Rename sha256.py test.
2016-10-28 19:51:54 +03:00
Alex March
b83ac44e82
tests/extmod/uhashlib_sha1: Coverage for SHA1 algorithm.
2016-10-28 19:51:46 +03:00
Paul Sokolovsky
b0feef7a57
zephyr/zephyr_getchar: Update for recent Zephyr refactor of console hooks.
...
uart_irq_input_hook_set() was renamed to uart_console_in_debug_hook_install()
and accepts different params.
2016-10-28 17:53:10 +03:00
Paul Sokolovsky
c28f9df63a
docs/library/network: Typo fixes, consistent acronym capitalization.
2016-10-28 12:03:35 +03:00