Commit Graph

27213 Commits

Author SHA1 Message Date
John R. Lenton
ff8007c7d6 Merge remote-tracking branch 'upstream/master' into builtins 2014-01-14 23:58:05 +00:00
Damien George
24224d7c72 Make GitHub logo/image a JPEG so it's smaller. 2014-01-14 23:55:53 +00:00
John R. Lenton
9daa78943e added enumerate() 2014-01-14 23:55:01 +00:00
Damien George
c6920d31e2 Merge pull request #170 from chipaca/master
made DEBUG control CFLAGS in Makefiles other than stm as well.
2014-01-14 15:54:31 -08:00
Damien George
0367ad6214 stm: Include libgcc for __aeabi_d2f and __aeabi_f2d functions.
Thanks to Dave Hylands for this.
2014-01-14 23:48:11 +00:00
Damien George
36b35c041b Merge pull request #163 from Metallicow/README-branch
Add combined image to GitHub front page README.md
2014-01-14 15:51:23 -08:00
Damien George
a04a33fee7 Merge pull request #175 from iabdalkader/master
Add missing ADC driver
2014-01-14 15:41:05 -08:00
Damien George
11cc694aa0 Merge pull request #173 from pfalcon/file-readall
Generic implementation if stream readall() method, immediately reused in unix io.FileIO implementation
2014-01-14 15:35:50 -08:00
Damien George
39eab8de96 Merge pull request #161 from pfalcon/exc-more-pythonic
Move towards Python-compliant interface of exceptions
2014-01-14 15:27:59 -08:00
Damien George
66a5bf681d Merge pull request #142 from chipaca/containment
Implemented support for `in` and `not in` operators.
2014-01-14 15:23:09 -08:00
Damien George
0f59203e37 Tidy up. 2014-01-14 23:18:35 +00:00
Damien George
6c2401e935 Merge pull request #165 from chipaca/builtins
added zip()
2014-01-14 15:13:40 -08:00
Paul Sokolovsky
8bc96471f0 Implement "is" and "is not" operators.
So far, don't work for strings as expected.
2014-01-15 00:32:09 +02:00
Paul Sokolovsky
ddf2178d83 Refactor exception objects to have better impl of Python-side interface.
This implements internal args tuple of arguments, while still keeping
object useful for reporting C-side errors.

Further elaboration is needed.
2014-01-15 00:03:23 +02:00
Paul Sokolovsky
8eec8bcad9 Add objtuple.h to allow embedding of tuples inside other objects.
This is useful because tuple is closest analog of C static array.
2014-01-14 23:59:18 +02:00
mux
8c10240722 Add ADC support for internal TEMP/VBAT/VREF
* Add ADC support for reading internal temperature sensor.
* Add ADC support for reading internal VREF/VBAT monitor.
2014-01-14 22:32:53 +02:00
mux
3591285091 Implement initial ADC support
* Add simple ADC driver, with support for ADC1 and all channels.
* Export MicroPython ADC object with read_channel function.
* Add stm32f4xx_adc.c and adc.c to Makefile.
2014-01-14 19:57:51 +02:00
mux
b4e374f138 Add missing ADC driver
* Add missing ADC driver from STM32F4xx_StdPeriph_Lib_V1.3.0
2014-01-14 19:51:15 +02:00
xyb
82e61bdc24 support int(str, basbase) 2014-01-14 22:43:18 +08:00
xyb
c178ea471e Implemented int(str) in UNIX 2014-01-14 21:39:05 +08:00
John R. Lenton
93451002f0 Merge remote-tracking branch 'upstream/master' into builtins
Conflicts:
	py/builtin.c
	py/builtin.h
	py/runtime.c
2014-01-13 23:14:35 +00:00
John R. Lenton
f5a0a7d2b3 Merge remote-tracking branch 'upstream/master' into containment 2014-01-13 23:09:04 +00:00
John R. Lenton
10d2f72860 Merge remote-tracking branch 'upstream/master' 2014-01-13 22:55:51 +00:00
Paul Sokolovsky
5225450b9f Add generic impl of stream .readall() method. Use one for unix io.FileIO. 2014-01-13 23:31:06 +02:00
Paul Sokolovsky
5d2499c638 Add "buffer management" and "shrink" API calls to vstr.
vstr is initially intended to deal with arbitrary-length strings. By
providing a bit lower-level API calls, it will be also useful to deal
with arbitrary-length I/O buffers (the difference from strings is that
buffers are filled from "outside", via I/O).

Another issue, especially aggravated by I/O buffer use, is alloc size
vs actual size length. If allocated 1Mb for buffer, but actually
read 1 byte, we don't want to keep rest of 1Mb be locked by this I/O
result, but rather return it to heap ASAP ("shrink" buffer before passing
it to qstr_from_str_take()).
2014-01-13 23:31:06 +02:00
Paul Sokolovsky
ca318bba0d mp_obj_equal(): Compare small and long ints properly.
By dispatching to long int methods.
2014-01-13 22:41:16 +02:00
Paul Sokolovsky
76a90f2f60 Move mp_obj_int_t definition to objint.h, to reuse in long int impls. 2014-01-13 22:36:49 +02:00
John R. Lenton
88cb1e60e0 Made sorted() raise an exception instead of aborting when given no arguments; moved around some things in objfun.c as a consequence 2014-01-13 19:55:18 +00:00
John R. Lenton
2ded68db77 Cleaned up sorted() as per Damien's suggestions. 2014-01-13 19:52:28 +00:00
Damien George
f62d33aa1d Consolidate rt_make_function_[0123] to rt_make_function_n. 2014-01-13 19:50:05 +00:00
Damien George
f88a72a88e Merge pull request #168 from dhylands/add-strstr
Added public domain implementations of strchr and strstr.
2014-01-13 11:43:57 -08:00
Damien George
2300537c79 Cleanup built-ins, and fix some compiler warnings/errors. 2014-01-13 19:39:01 +00:00
Damien George
3f5e1b3e2f Merge pull request #172 from dhylands/init-kw
Initialize is_kw for dynamically allocated mp_obj_fun_native_t ojects.
2014-01-13 11:08:05 -08:00
Dave Hylands
44332ec9ea Initialize is_kw for dynamically allocated mp_obj_fun_native_t ojects.
This should fix issue #171
2014-01-13 08:55:51 -08:00
John R. Lenton
9549919349 made DEBUG control CFLAGS in Makefiles oter than stm as well. 2014-01-13 13:25:10 +00:00
Mark Schafer
a23a24f89c logo gradients in master SVG, png
Also new vector_log png with alpha
2014-01-14 01:49:11 +13:00
Dave Hylands
c8effff937 Added public domain implementations of strchr and strstr. 2014-01-12 22:34:58 -08:00
John R. Lenton
5c76839559 sorted 2014-01-13 05:12:50 +00:00
John R. Lenton
07205ec323 added zip() 2014-01-13 02:31:00 +00:00
Metallicow
7ab9c21945 Add combined image to GitHub front page README.md 2014-01-12 19:21:02 -06:00
John R. Lenton
189c8e1cc4 Fixed the merge so it worked and compiled and stuff 2014-01-13 00:52:06 +00:00
John R. Lenton
13e64f0660 Merge remote-tracking branch 'upstream/master' into containment 2014-01-13 00:41:12 +00:00
Damien George
34f813ee29 Merge pull request #162 from chipaca/str_find
Implement a basic str.find; fixes #67
2014-01-12 16:34:03 -08:00
Damien George
ec3e14e2af Merge pull request #160 from pfalcon/elaborate-int
Elaborate small-int/long-int
2014-01-12 16:32:21 -08:00
Damien George
45eb6eaa54 Merge pull request #159 from chipaca/set_feats
Set features. As per #143.
2014-01-12 16:26:58 -08:00
Damien George
ed3a32b117 Merge pull request #157 from dhylands/printf-float
Added a hacky implementation for %g
2014-01-12 16:26:20 -08:00
Damien George
328708eb25 stm: Re-instate C debugging USART port (disabled by default).
See pyb_usart_global_debug variable.

Also did some work on USB OTG, but nothing working yet.
2014-01-13 00:20:06 +00:00
John R. Lenton
7244a14439 oops, nasty off-by-one in set_copy 2014-01-12 23:37:45 +00:00
John R. Lenton
be790f94d5 Implemented set binary ops. 2014-01-12 23:09:10 +00:00
John R. Lenton
e820491f7a Implement a basic str.find; fixes #67 2014-01-12 21:53:52 +00:00