- 20 4月, 2014 2 次提交
-
-
由 Damien George 提交于
-
由 Damien George 提交于
These are to assist in writing native C functions that take positional and keyword arguments. mp_arg_check_num is for just checking the number of arguments is correct. mp_arg_parse_all is for parsing positional and keyword arguments with default values.
-
- 19 4月, 2014 27 次提交
-
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Paul Sokolovsky 提交于
-
由 Paul Sokolovsky 提交于
-
由 Paul Sokolovsky 提交于
-
由 Paul Sokolovsky 提交于
-
由 Paul Sokolovsky 提交于
-
由 Paul Sokolovsky 提交于
-
由 Paul Sokolovsky 提交于
'p' in struct module is "pascal string". 'P' is void*.
-
由 Damien George 提交于
It's Light Emitting Diode, so should be LED.
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
Main reason for expanding buffer protocol API was to support writes to a buffer in ADC module (see read_timed). With this change you can now create an array of arbitrary type and ADC.read_timed will store into that array in the correct format (byte, int, float). I wonder though if all these changes were really worth it to support just this function. Hopefully this enhanced buffer protocol API (with typecode specified) will be used elsewhere.
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
This is an attempt to clean up the Micro Python API on the pyboard. Gpio functionality is now in the Pin object, which seems more natural. Constants for MODE and PULL are now in pyb.Pin. Names of some classes have been adjusted to conform to CamelCase. Other miscellaneous changes and clean up here and there.
-
由 Damien George 提交于
-
由 Damien George 提交于
When querying an object that supports the buffer protocol, that object must now return a typecode (as per binary.[ch]). This does not have to be honoured by the caller, but can be useful for determining element size.
-
由 Damien George 提交于
We are not as verbose as CPython, and maybe a bit too cryptic sometimes.
-
由 Damien George 提交于
-
由 Paul Sokolovsky 提交于
-
由 Paul Sokolovsky 提交于
-
由 Paul Sokolovsky 提交于
Test usecase I used is print(time.time()) and print(time.time() - time.time()). On Linux/Glibc they now give the same output as CPython 3.3. Specifically, time.time() gives non-exponential output with 7 decimal digits, and subtraction gives exponential output e-06/e-07.
-
- 18 4月, 2014 11 次提交
-
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Paul Sokolovsky 提交于
I skipped implementing this initially, but then it causes __name__ of current module be overwritten and relative imports fail.
-
由 Damien George 提交于
On stmhal, computed gotos make the binary about 1k bigger, but makes it run faster, and we have the room, so why not. All tests pass on pyboard using computed gotos.
-
由 Damien George 提交于
-
由 Damien George 提交于
Also make consistent use of MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL. This helps a lot in debugging and understanding of function API.
-
由 Damien George 提交于
-
由 Damien George 提交于
mp_obj_t->subscr now does load/store/delete.
-
由 Paul Sokolovsky 提交于
-
由 Damien George 提交于
-