Damien George
3022e00bbf
lib/netutils: Update for changes to mp_obj_str_get_data.
2017-03-29 12:56:45 +11:00
Damien George
204ded848e
extmod: Update for changes to mp_obj_str_get_data.
2017-03-29 12:56:45 +11:00
Damien George
6b34107537
py: Change mp_uint_t to size_t for mp_obj_str_get_data len arg.
2017-03-29 12:56:45 +11:00
Damien George
ca06fac4a1
stmhal: Update to use size_t for tuple/list accessors.
2017-03-29 12:56:45 +11:00
Damien George
1d7e3113db
esp8266: Update to use size_t for tuple/list accessors.
2017-03-29 12:56:45 +11:00
Damien George
87f068d7d9
cc3200: Update to use size_t for tuple/list accessors.
2017-03-29 12:56:17 +11:00
Damien George
46e98d9ea7
unix: Convert mp_uint_t to size_t for use of mp_obj_list_get.
2017-03-29 12:56:17 +11:00
Damien George
a8a3ab48da
extmod/moduselect: Update to use size_t for array accessor.
2017-03-29 12:56:17 +11:00
Damien George
6213ad7f46
py: Convert mp_uint_t to size_t for tuple/list accessors.
...
This patch changes mp_uint_t to size_t for the len argument of the
following public facing C functions:
mp_obj_tuple_get
mp_obj_list_get
mp_obj_get_array
These functions take a pointer to the len argument (to be filled in by the
function) and callers of these functions should update their code so the
type of len is changed to size_t. For ports that don't use nan-boxing
there should be no change in generate code because the size of the type
remains the same (word sized), and in a lot of cases there won't even be a
compiler warning if the type remains as mp_uint_t.
The reason for this change is to standardise on the use of size_t for
variables that count memory (or memory related) sizes/lengths. It helps
builds that use nan-boxing.
2017-03-29 12:56:17 +11:00
Damien George
f7816188b7
extmod/vfs_fat: Fix calculation of total blocks in statvfs.
2017-03-29 12:53:35 +11:00
Damien George
f9b0e644e5
py/compile: Provide terse error message for invalid dict/set literals.
2017-03-29 12:44:27 +11:00
Damien George
18c059febf
py: Shorten a couple of error messages.
2017-03-29 12:36:46 +11:00
Damien George
f55a059e7a
py/compile: Simplify syntax-error messages for illegal assignments.
...
With this patch all illegal assignments are reported as "can't assign to
expression". Before the patch there were special cases for a literal on
the LHS, and for augmented assignments (eg +=), but it seems a waste of
bytes (and there are lots of bytes used in error messages) to spend on
distinguishing such errors which a user will rarely encounter.
2017-03-29 12:28:33 +11:00
Damien George
5010d1958f
py/lexer: Simplify and reduce code size for operator tokenising.
...
By removing the 'E' code from the operator token encoding mini-language the
tokenising can be simplified. The 'E' code was only used for the !=
operator which is now handled as a special case; the optimisations for the
general case more than make up for the addition of this single, special
case. Furthermore, the . and ... operators can be handled in the same way
as != which reduces the code size a little further.
This simplification also removes a "goto".
Changes in code size for this patch are (measured in bytes):
bare-arm: -48
minimal x86: -64
unix x86-64: -112
unix nanbox: -64
stmhal: -48
cc3200: -48
esp8266: -76
2017-03-29 10:56:52 +11:00
Paul Sokolovsky
e93c4ca181
zephyr/prj_base.conf: Enable TCP (and UDP explicitly).
2017-03-29 00:46:06 +03:00
Glenn Ruben Bakke
a139d5e8f7
nrf5/modules/ubluepy: Adding some work in progress on service discovery.
2017-03-28 23:40:28 +02:00
Glenn Ruben Bakke
8966c68b92
nrf5/bluetooth: Adding implementation to the discover service function. Adding handler for gatt client primary service discovery response events, and passing this to the ubluepy upon reception.
2017-03-28 23:37:19 +02:00
Glenn Ruben Bakke
61b825d75e
nrf5/bluetooth: Adding function parameters and return type to service and characteristic discovery template functions.
2017-03-28 21:20:20 +02:00
Damien George
94c41bb06f
py: Use mp_raise_TypeError/mp_raise_ValueError helpers where possible.
...
Saves 168 bytes on bare-arm.
2017-03-28 22:37:26 +11:00
Damien George
7b1804c582
stmhal/dma: Fix reinitialisation of DMA on F7 MCUs, following F4.
2017-03-28 12:59:02 +11:00
Damien George
e997bb6328
stmhal/hal: For F7 MCUs, expose DMA_CalcBaseAndBitshift function.
...
It's needed by the DMA driver to do an efficient reinitialisation. This
patch follows what is done in the F4 HAL.
2017-03-28 12:56:18 +11:00
Damien George
ff927cb106
stmhal/spi: Clean and/or invalidate D-cache before SPI DMA transfers.
...
On MCUs with a cache (eg F7) this must be done or else the SPI data that is
transferred is incorrect.
2017-03-28 12:54:01 +11:00
Damien George
9a1b3da158
stmhal/board: Fix existing and add more pin defs for NUCLEO_F767ZI.
2017-03-28 12:42:23 +11:00
Damien George
8b36664e17
stmhal/boards: Fix alt-func config for PA5 of STM32F767.
2017-03-28 12:41:55 +11:00
Paul Sokolovsky
dbb2aea428
zephyr/prj_base.conf: Disable legacy kernel compatibility.
...
This keeps dependency on mdef, sysgen and other stuff which complicates
build integration.
2017-03-27 17:06:30 +03:00
Damien George
54507f78ee
py/objmap: Convert mp_uint_t to size_t.
2017-03-27 12:19:24 +11:00
Damien George
f648e5442b
esp8266/modesp: Remove long-obsolete and unused espconn bindings.
2017-03-27 12:05:18 +11:00
Damien George
734775524e
tests/basics: Add test for super() when self is closed over.
2017-03-27 11:29:11 +11:00
Damien George
40c1272e55
py/compile: When compiling super(), handle closed-over self variable.
...
The self variable may be closed-over in the function, and in that case the
call to super() should load the contents of the closure cell using
LOAD_DEREF (before this patch it would just load the cell directly).
2017-03-27 11:27:08 +11:00
Damien George
a0973b09ce
py/vm: Fix VM opcode tracing to print correct stack pointer.
...
Also const_table is now moved to the code_state->fun_bc structure.
2017-03-27 10:52:04 +11:00
Paul Sokolovsky
220df8544b
zephyr/zephyr_getchar: Use native k_sem instead of legacy nano_sem.
2017-03-27 00:41:58 +03:00
Glenn Ruben Bakke
06af64a78a
nrf5/bluetooth: Adding template functions for service discovery in bluetooth driver.
2017-03-26 22:59:30 +02:00
Glenn Ruben Bakke
0914b34193
nrf5/bluetooth: Adding function to register gattc event handler (central).
2017-03-26 22:57:07 +02:00
Glenn Ruben Bakke
025f07dbab
nrf5/bluetooth: Adding intermediate gattc callback function type in bluetooth driver.
2017-03-26 22:51:10 +02:00
Glenn Ruben Bakke
49cce723a9
nrf5/bluetooth: Turning off debug logging in bluetooth driver, which does not work well with bluetooth REPL mode.
2017-03-26 21:06:17 +02:00
Glenn Ruben Bakke
2f2e67e9bd
nrf5/bluetooth: Fixing some smaller tab errors in the bluetooth driver.
2017-03-26 21:05:06 +02:00
Glenn Ruben Bakke
cd2149a47f
nrf5/bluetooth: Updating bluetooth le driver to handle GAP conn param update request. Also updating minor syntax in previous switch case.
2017-03-26 21:02:25 +02:00
Glenn Ruben Bakke
fb983c7692
nrf5/boards: Inrease heap size in the nrf52832 w/s132 bluetooth stack linker script.
2017-03-26 20:46:23 +02:00
Glenn Ruben Bakke
c230bc021a
nrf5/modules/ubluepy: Update connect method to parse dev_addr parameter and pass it to the bluetooth driver, going through a allocated heap buffer. Adding call to the bluetooth driver to issue a connect. Hardcoding address type for now.
2017-03-26 20:45:21 +02:00
Glenn Ruben Bakke
bcf4631e0a
nrf5/bluetooth: Updating connect function in the bluetooth driver to do a successful connect to a peripheral device.
2017-03-26 20:43:43 +02:00
Damien George
3f810daeb3
py/obj: Change mp_uint_t to size_t for mp_obj_get_array_fixed_n len arg.
2017-03-26 19:20:06 +11:00
Damien George
9c388f66cf
esp8266/modesp: Use mp_obj_str_get_str instead of mp_obj_str_get_data.
2017-03-26 19:19:48 +11:00
Damien George
b568448306
extmod/modlwip: Use mp_obj_str_get_str instead of mp_obj_str_get_data.
2017-03-26 19:19:35 +11:00
Damien George
fb139a4ba6
README: Change Travis & Coveralls badges to not use link references.
...
Link references don't seem to work anymore.
2017-03-26 17:03:54 +11:00
Paul Sokolovsky
99866a00a0
py/nlrx86: Better check for Zephyr (requires 1.7).
2017-03-26 00:33:23 +03:00
Glenn Ruben Bakke
4d147beedb
nrf5/modules/ubluepy: Adding template function for central connect() in peripheral object.
2017-03-25 17:51:52 +01:00
Glenn Ruben Bakke
098e64b122
nrf5/modules/ubluepy: Adding locals dict to Scan Entry introducing function to retreive Scan Data. Not working as expected together with .attr. It looks like locals dict functions are treated to be attributes and cannot be resolved.
2017-03-25 17:39:44 +01:00
Paul Sokolovsky
fa17eabce9
README: Describe extmod/ dir.
2017-03-25 17:12:24 +03:00
Paul Sokolovsky
c16d1c07ca
README: Add link to docs.micropython.org.
2017-03-25 17:07:57 +03:00
Damien George
29424304d9
unix: Use mp_obj_str_get_str instead of mp_obj_str_get_data.
2017-03-25 19:54:07 +11:00