Daniel Campora
ed56b0baba
cc3200: Finally unlock the full wake on WLAN feature set.
10 years ago
Daniel Campora
18030bd85d
cc3200: Add own ubinascii module.
The reason to have our owm ubinascii module is so that later we
can add crc32 support using the hardware engine.
10 years ago
Daniel Campora
7bd273b818
extmod: Actually expose the ubinascii python methods.
10 years ago
Dave Hylands
a3a14b9db7
lib: Fix some issues in timeutils
In particular, dates prior to Mar 1, 2000 are screwed up.
The easiest way to see this is to do:
>>> import time
>>> time.localtime(0)
(2000, 1, 1, 0, 0, 0, 5, 1)
>>> time.localtime(1)
(2000, 1, 2, 233, 197, 197, 6, 2)
With this patch, we instead get:
>>> import time
>>> time.localtime(1)
(2000, 1, 1, 0, 0, 1, 5, 1)
Doh - In C % is NOT a modulo operator, it's a remainder operator.
10 years ago
Daniel Campora
6f1cffeb28
py: Remove hexdigest QSTR since the method has been removed as well.
10 years ago
Daniel Campora
7506db4ccb
cc3200: Remove uhashlib.hexdigest().
10 years ago
Paul Sokolovsky
2fddc68fdf
moduhashlib: Remove not implemented .hexdigest().
Effect can be easily achieved by ubinsacii.hexlify(hash.digest()).
10 years ago
Daniel Campora
0f716aced7
extmod: Expose mod_binascii_hexlify() and mod_binascii_unhexlify().
10 years ago
Damien George
a3c96c9252
pic16bit: Add readinto and readlines to qstrs.
10 years ago
Daniel Campora
e800db562f
cc3200: Add uhashlib. Supports SHA1 and SHA256.
10 years ago
Daniel Campora
5e38b48dd6
cc3200: Fix time.localtime() so that it returns the correct fields.
10 years ago
Daniel Campora
56053c37cf
cc3200: Rewrite WLAN.ifconfig(). Add WLAN.info() and WLAN.connections().
10 years ago
Daniel Campora
514ba15d6a
cc3200: Disable UCTYPES and enable ARRAY_SLICE_ASSIGN.
10 years ago
Dave Hylands
afaa66b657
py: Minor improvement to unichar_isxdigit
This drops the size of unicode_isxdigit from 0x1e + 0x02 filler to
0x14 bytes (so net code reduction of 12 bytes) and will make
unicode_is_xdigit perform slightly faster.
10 years ago
Dave Hylands
3ad94d6072
extmod: Add ubinascii.unhexlify
This also pulls out hex_digit from py/lexer.c and makes unichar_hex_digit
10 years ago
Dave Hylands
97ce883217
tools: Add exec_raw_no_follow to pyboard.py.
10 years ago
stijn
861670ba2a
py: Implement mp_format_float for doubles and use where appropriate
This allows using (almost) the same code for printing floats everywhere,
removes the dependency on sprintf and uses just snprintf and
applies an msvc-specific fix for snprintf in a single place so
nan/inf are now printed correctly.
10 years ago
Kaspar Schleiser
f5dd6f7f37
py/binary: Make return type of mp_binary_get_size size_t instead of int.
Fixes sign-compare warning.
10 years ago
Kaspar Schleiser
b5cef5c7ea
py/objobject: Don't make locals_dict if there's nothing to go in it.
10 years ago
Kaspar Schleiser
cf5112b26f
py: Change _mp_obj_fun_builtin_t.fun to function pointer.
ISO C forbids conversion between function pointers and void*, gcc
-pedantic triggers a warning.
10 years ago
Damien George
44e7cbf019
py: Clean up declarations of str type/funcs that are also in unicode.
Background: trying to make an amalgamation of all the code gave some
errors with redefined types and inconsistent use of static.
10 years ago
Daniel Campora
6f848b6dba
cc3200: Set the timer edge count interrupt value in the calbback const.
10 years ago
Daniel Campora
95a4f61499
cc3200: Make sure RTC wake value is >= 1ms.
10 years ago
Daniel Campora
c27dc38e85
cc3200: Re-name 'intmode' to 'mode' in the callback API.
10 years ago
Daniel Campora
cd3f2523f1
cc3200: Disable WLAN.urn() by default.
Can be enabled by defining MICROPY_PORT_WLAN_URN=1 in mpconfigport.h.
10 years ago
Daniel Campora
a379b6ed11
cc3200: Add optional timeout param to WLAN.connect().
10 years ago
Daniel Campora
fb9e4cf463
cc3200: Make sure to handle all pending pin interrupts.
When entering the interrupt handler of a given GPIO port, more than
one pin could have pending interrupts, therefore care must be taken
to service each interrupt one by one before leaving.
10 years ago
Daniel Campora
8e611e8414
cc3200: Add Timer module. Supports free running, PWM and capture modes.
10 years ago
Daniel Campora
9466e154b4
cc3200: Fix power mode param check in the UART callback constructor.
10 years ago
Daniel Campora
2b62707051
cc3200: Add os.rename()
10 years ago
Paul Sokolovsky
ebf8dc6b03
Revert "unix: Include stdio.h to allow easy debugging with printf()."
This reverts commit 8fbabab1a8
. Turned to
cause problems on MacOSX.
10 years ago
Damien George
d7b7d5f6ee
docs: Bump version to 1.4.3.
10 years ago
stijn
709955b601
py: Fix printing of complex number when imaginary part is nan
10 years ago
Damien George
1db3577bcb
teensy: Add readinto and readlines qstrs.
10 years ago
Damien George
0bfc57022d
docs: Document USB_VCP file-like methods.
10 years ago
Damien George
1511dd4f84
stmhal: Add readinto and readlines methods to sys.stdin, pyb.USB_VCP().
Addresses issue #1255 .
10 years ago
Josef Gajdusek
1c132c8587
esp8266: Add configuration option for redirecting the built-in OS output
10 years ago
Josef Gajdusek
40c6d57804
esp8266: Actually use the decimal part of system_rtc_clock_cali_proc()
10 years ago
stijn
a09757f104
windows: Enable some recently added features in mpconfigport.h
10 years ago
Damien George
304a96d7d6
esp8266: Put more literal and text obj data in irom0_0_seg.
With newer versions of esp_iot_sdk the iram1_0_seg started to overflow.
Now it doesn't.
Addresses issue #1254 .
10 years ago
Damien George
4e7dc97bdc
esp8266: Add module weak links; link time to utime.
10 years ago
Josef Gajdusek
103d12a877
esp8266: Add utime and pyb.RTC
10 years ago
Josef Gajdusek
b47931978f
esp8266: Update the linker script
Moved modesp.o to flash and increased size of the irom0_0_seg segment. The new
value was taken from NodeMCU linker script.
10 years ago
Josef Gajdusek
1db4253886
lib: Move time utility functions to common library.
10 years ago
Josef Gajdusek
800d5cd16f
esp8266: Implement time functions
10 years ago
Steve Zatz
c7df9c6c47
stmhal: Add os.rename function.
10 years ago
Damien George
f601390ef8
unix: Add some extra coverage tests for vstr and attrtuple.
10 years ago
Damien George
7bab32ef89
tests: Add further tests for class defining __hash__.
10 years ago
Damien George
c50772d19f
py: Add mp_obj_get_int_truncated and use it where appropriate.
mp_obj_get_int_truncated will raise a TypeError if the argument is not
an integral type. Use mp_obj_int_get_truncated only when you know the
argument is a small or big int.
10 years ago
Damien George
c2a4e4effc
py: Convert hash API to use MP_UNARY_OP_HASH instead of ad-hoc function.
Hashing is now done using mp_unary_op function with MP_UNARY_OP_HASH as
the operator argument. Hashing for int, str and bytes still go via
fast-path in mp_unary_op since they are the most common objects which
need to be hashed.
This lead to quite a bit of code cleanup, and should be more efficient
if anything. It saves 176 bytes code space on Thumb2, and 360 bytes on
x86.
The only loss is that the error message "unhashable type" is now the
more generic "unsupported type for __hash__".
10 years ago