Paul Sokolovsky
fbb8335084
py/objdict: Make .fromkeys() method configurable.
...
On by default, turned off for minimal/bare-arm. Saves 144 bytes on x86.
2018-12-13 01:20:55 +11:00
Paul Sokolovsky
169b152f29
docs/ure: Fully describe supported syntax subset, add example.
2018-12-13 01:16:30 +11:00
Damien George
1db55381b6
stm32/adc: Support 16-bit ADC configuration on H7 MCUs.
2018-12-12 12:51:46 +11:00
Damien George
6cab8daee0
stm32/adc: Increase ADC sampling time for internal sources on H7 MCUs.
2018-12-12 12:51:26 +11:00
Damien George
0555ada277
stm32/adc: Fix calibrated volt/temp readings on H7 by using 16bit scale.
2018-12-12 12:50:37 +11:00
Damien George
1b4031ed64
stm32/extint: Use correct EXTI channels on H7 MCUs for RTC events.
2018-12-12 12:49:23 +11:00
Glenn Ruben Bakke
9e5768a6db
nrf/bluetooth: Update BLE stack download script.
...
Due to new webpages at nordicsemi.com, the download links
for Bluetooth LE stacks were broken.
This patch updates the links to new locations for the current
targets.
2018-12-10 20:42:06 +01:00
Damien George
beeeec292b
docs/README: Remove references to MICROPY_PORT when building docs.
...
The docs are now built as one for all ports.
2018-12-11 02:55:22 +11:00
Damien George
025d419a77
teensy: Add own uart.h to not rely on stm32's version of the file.
2018-12-10 23:55:11 +11:00
Damien George
dc23978dde
stm32/uart: Add ability to have a static built-in UART object.
...
A static UART is useful for internal peripherals that require a UART and
need to persist outside the soft-reset loop.
2018-12-10 16:21:50 +11:00
Damien George
61ef031687
stm32/uart: Move config of char_width/char_mask to uart.c.
2018-12-10 16:21:50 +11:00
Damien George
6ea45277bf
stm32/uart: For UART init, pass in params directly, not via HAL struct.
...
To provide a cleaner and more abstract C-level interface to the UART.
2018-12-10 16:21:50 +11:00
Damien George
e0c2432503
stm32/uart: Simplify deinit of UART, no need to call HAL.
...
The HAL just clears UE and then clears all the UART control registers.
2018-12-10 16:21:50 +11:00
Damien George
bc3f0dddac
stm32/uart: Remove HAL's UART_HandleTypeDef from UART object struct.
...
This UART_HandleTypeDef is quite large (around 70 bytes in RAM needed for
each UART object) and is not needed: instead the state of the peripheral
held in its registers provides all the required information.
2018-12-10 16:21:50 +11:00
Damien George
7d7f59d78b
stm32/uart: Factor out code to set RX buffer to function uart_set_rxbuf.
2018-12-10 16:21:50 +11:00
Damien George
9690757cca
stm32/uart: Rework uart_get_baudrate so it doesn't need a UART handle.
2018-12-10 16:21:50 +11:00
Damien George
524e13b006
stm32/uart: Factor out code from machine_uart.c that computes baudrate.
2018-12-10 16:21:50 +11:00
Damien George
a2271532be
stm32: Split out UART Python bindings from uart.c to machine_uart.c.
2018-12-10 16:21:50 +11:00
Damien George
55830dd9bf
py/objexcept: Make sure mp_obj_new_exception_msg doesn't copy/format msg
...
mp_obj_new_exception_msg() assumes that the message passed to it is in ROM
and so can use its data directly to create the string object for the
argument of the exception, saving RAM. At the same time, this approach
also makes sure that there is no attempt to format the message with printf,
which could lead to faults if the message contained % characters.
Fixes issue #3004 .
2018-12-10 16:01:05 +11:00
Damien George
bad4e15da5
py/objexcept: Use macros to make offsets in emergency exc buf clearer.
2018-12-10 15:53:38 +11:00
Paul Sokolovsky
38151f35c1
extmod/moductypes: Add aliases for native C types.
...
SHORT, INT, LONG, LONGLONG, and unsigned (U*) variants are being defined.
This is done at compile using GCC-style predefined macros like
__SIZEOF_INT__. If the compiler doesn't have such defines, no such types
will be defined.
2018-12-10 14:40:43 +11:00
Damien George
074597f172
tests/extmod/uctypes_error: Add test for unsupported unary op.
2018-12-10 14:29:41 +11:00
Paul Sokolovsky
0de6815ec1
tests/extmod/uctypes_ptr_le: Test int() operation on a pointer field.
2018-12-10 14:25:06 +11:00
Paul Sokolovsky
9d864bde04
extmod/moductypes: Implement __int__ for PTR.
...
Allows to get address a pointer contains, as an integer.
2018-12-10 14:25:05 +11:00
Paul Sokolovsky
d690c2e148
tests/basics/special_methods: Add testcases for __int__.
2018-12-07 17:28:04 +11:00