Glenn Ruben Bakke
3b2ca64738
nrf5/boards: Remove define of machine PWM module configuration in nrf51 targets, as the device does not have a HW PWM peripheral.
2017-03-07 18:05:38 +01:00
Glenn Ruben Bakke
5f9b070f6d
nrf5: Disable machine PWM module by default if board does not define it.
2017-03-07 18:04:54 +01:00
Glenn Ruben Bakke
9689aae45b
nrf5/boards: Disable all display modules in pca10028 board config.
2017-03-07 18:01:13 +01:00
Glenn Ruben Bakke
9d2a2d227c
nrf5: Updated after merge with master. Updating nlr_jump_fail to call __fatal_error in order to provide a non-returning function call.
2017-03-07 17:53:10 +01:00
Glenn Ruben Bakke
fd8f2c36f5
Merge branch 'master' into nrf5_no_sdk
2017-03-07 17:46:34 +01:00
Glenn Ruben Bakke
5f705adae0
nrf5/boards: Adding more heap memory to the nrf51 256k/32k s110 linker script. Leaving 2k for stack.
2017-03-07 17:41:46 +01:00
Paul Sokolovsky
fd49ff9917
py/nlrx86: Add workaround for Zephyr.
...
Actually, this removes -fno-omit-frame-pointer workaround for Zephyr.
2017-03-07 16:48:09 +01:00
Paul Sokolovsky
830ce74f32
extmod/modutimeq: Make scheduling fair (round-robin).
...
By adding back monotonically increasing field in addition to time field.
As heapsort is not stable, without this, among entried added and readded
at the same time instant, some might be always selected, and some might
never be selected, leading to scheduling starvation.
2017-03-07 09:34:09 +01:00
Paul Sokolovsky
bdd48e67ee
tests/uctypes_array_assign_native_le: Split off intbig part.
2017-03-07 08:40:03 +01:00
James Ouyang
e73a0b944f
docs/esp8266/tutorial: Update since esptool 1.3 added Python 3 support.
...
esptool 1.3 now supports both Python 2.7 and 3.4+.
Updated github link to now-official espressif repo.
2017-03-07 18:23:24 +11:00
Rami Ali
2646b9e022
docs/library/lcd160cr: Add link to framebuf page.
2017-03-07 18:17:40 +11:00
Rami Ali
f9d18d96b7
docs/library: Add framebuf documentation.
2017-03-07 18:16:46 +11:00
Paul Sokolovsky
c98d7461a1
tests/micropython/: Split off intbig tests.
2017-03-07 07:12:58 +01:00
Krzysztof Blazewicz
1bd17de4b7
tests/basics/unpack1.py: Test if *a, = b copies b when b is a list.
2017-03-07 16:48:16 +11:00
Krzysztof Blazewicz
38c3778b27
tests/basics/string_join.py: Add test case where argument is not iterable.
2017-03-07 16:48:16 +11:00
Krzysztof Blazewicz
7e480e8a30
py: Use mp_obj_get_array where sequence may be a tuple or a list.
2017-03-07 16:48:16 +11:00
Krzysztof Blazewicz
1215dc47e2
py/runtime.c: Remove optimization of '*a,=b', it caused a bug.
...
*a, = b should always make a copy of b, instead, before this patch
if b was a list it would copy only a reference to it.
2017-03-07 16:48:16 +11:00
Paul Sokolovsky
88ffe0d5cc
tests/string_format_modulo2: Split off intbig test.
2017-03-07 00:13:36 +01:00
Glenn Ruben Bakke
2e1335b051
nrf5/modules/machine: Adding __WFI() on machine.deepsleep()
2017-03-06 23:36:36 +01:00
Glenn Ruben Bakke
4e1b9aca79
nrf5/modules/machine: Adding __WFE() on machine.sleep()
2017-03-06 23:35:32 +01:00
Glenn Ruben Bakke
4afa41ac36
nrf5/modules/machine: Adding enable_irq() and disable_irq() method to the machine module. No implementation yet for the case where bluetooth stack is used.
2017-03-06 23:30:56 +01:00
Glenn Ruben Bakke
5acba015ef
nrf5/modules/rtc: Adding support for stopping and restarting rtc (if periodic) for all the instances of RTC.
2017-03-06 23:05:03 +01:00
Glenn Ruben Bakke
7c50cd26a2
nrf5/modules: Updating RTC kwarg from type to mode to set ONESHOT or PERIODIC mode.
2017-03-06 22:59:43 +01:00
Paul Sokolovsky
320099aab9
tools/tinytest-codegen: Update for recent test renaming ("intbig" suffix).
2017-03-06 22:40:04 +01:00
Glenn Ruben Bakke
3debb43e83
nrf5/modules: Adding support for periodic RTC callback.
2017-03-06 21:33:29 +01:00
Glenn Ruben Bakke
c301cca2a4
nrf5/hal: hal_rtc update. Adding current counter value to period value before setting it in the compare register.
2017-03-06 20:52:09 +01:00
Glenn Ruben Bakke
f50a56dbb5
nrf5/modules: Updating rtc module with non-const machine object list in order to allow setting callback function in constructor.
2017-03-06 20:09:04 +01:00
Glenn Ruben Bakke
87e1616488
nrf5/hal: Adding initialization of LFCLK if not already enabled in hal_rtc.
2017-03-06 20:06:47 +01:00
Paul Sokolovsky
4b03941f5e
tests/float2int*: Suffix with _intbig, don't run on any other int type.
...
I.e. they don't run successfully with MICROPY_LONGINT_IMPL_NONE
and MICROPY_LONGINT_IMPL_LONGLONG (the problem is that they generate
different output than CPython, TODO to fix that).
2017-03-06 16:30:12 +01:00
Paul Sokolovsky
121fb88988
float/float2int*: Make actually be parsable for MICROPY_LONGINT_IMPL_NONE.
...
The use of large literal numbers is a big no-no when it comes to writing
programs which work with different int representations. Also, some checks
are pretty adhoc (e.g using struct module to check for 64-bitness). This
change bases entire detection on sys.maxsize and integer operarions, and
thus more correct, even if longer.
Note that this change doesn't mean that any of these tests can pass with
anything but MPZ - even despite checking for various int representations,
the tests aren't written to be portable among them.
2017-03-06 16:23:09 +01:00
Paul Sokolovsky
325c4473a5
tests/float/complex1: Split out intbig test.
2017-03-06 15:46:01 +01:00
Paul Sokolovsky
96aa3a3102
py/modsys: Use MP_SMALL_INT_MAX for sys.maxsize in case of LONGINT_IMPL_NONE.
...
INT_MAX used previosly is indeed max value for int, whereas on LP64
platforms, long is used for mp_int_t. Using MP_SMALL_INT_MAX is the
correct way to do it anyway.
2017-03-06 12:15:25 +01:00
Damien George
914648ce0e
py/py.mk: Force nlr files to be compiled with -Os.
2017-03-06 17:13:43 +11:00
Damien George
f0dddb688d
py/nlrx86: Convert from assembler to C file with inline asm.
2017-03-06 17:13:43 +11:00
Damien George
321848470c
py/nlrx64: Convert from assembler to C file with inline asm.
2017-03-06 17:13:35 +11:00
Damien George
a85755aa22
py/nlrxtensa: Convert from assembler to C file with inline asm.
...
nlr_jump is a little bit inefficient because it now saves a register to
the stack.
2017-03-06 17:13:16 +11:00
Damien George
be3d7f91e5
py/nlr.h: Mark nlr_jump_fail as NORETURN.
2017-03-06 17:13:16 +11:00
Damien George
05fe66f68a
py: Move locals/globals dicts to the thread-specific state.
...
Each threads needs to have its own private references to its current
locals/globals dicts, otherwise functions running within different
contexts (eg imported from different files) can behave very strangely.
2017-03-06 17:01:56 +11:00
Glenn Ruben Bakke
7000e0a2a0
nrf5/modules: Moving irq priority settings in RTC object to rtc_init0 when initializing the hardware instances. Also modifying comments a bit. Adding simple example in comment above make_new function on how the object is intended to work.
2017-03-06 01:13:19 +01:00
Glenn Ruben Bakke
49b1607bed
nrf5: Updating main.c to initialize the rtc module if enabled.
2017-03-06 00:57:33 +01:00
Glenn Ruben Bakke
1ef7c732e8
nrf5/modules: Added RTC into the machine module globals dict.
2017-03-06 00:56:58 +01:00
Glenn Ruben Bakke
7144696e17
nrf5/modules: Updating rtc module. Not working yet. Updated to align with new hal_rtc interface. Added start and stop methods. Allowing callback function set from init. This should be moved to start function, not set in main.
2017-03-06 00:56:18 +01:00
Glenn Ruben Bakke
ff7541599a
nrf5/hal: Updating hal RTC implementation.
2017-03-06 00:53:21 +01:00
Glenn Ruben Bakke
852aaba58b
nrf5/hal: Adding hal_irq.h which defines a set of static inline functions to do nvic irq operations.
2017-03-06 00:50:00 +01:00
Glenn Ruben Bakke
9ddd62e73e
nrf5/modules: Updating machine uart module to use new hal uart interface name.
2017-03-05 22:37:52 +01:00
Glenn Ruben Bakke
0489153094
nrf5/hal: Renaming uart hal function to use hal_uart prefix.
2017-03-05 22:37:07 +01:00
Paul Sokolovsky
fe866d996f
unix/moduselect: Properly implement ipoll object iteration.
...
TODO: There's another issue to care about: poll set being modified during
iteration.
2017-03-05 13:51:22 +01:00
Glenn Ruben Bakke
ee5884bfe9
nrf5/modules: Updating readfrom function in machine i2c module to use the new hal function which has been implemented.
2017-03-04 21:44:23 +01:00
Glenn Ruben Bakke
2c61b7f596
nrf5/hal: Adding untested implementation of twi read. Lacking sensors to test with :)
2017-03-04 21:42:36 +01:00
Glenn Ruben Bakke
4a631a0d47
nrf5/boards: Renaming linker script for all nrf51 and nrf52 into more logical names. Updating all boards with new names.
2017-03-04 19:13:59 +01:00