aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-12-10teensy: Add own uart.h to not rely on stm32's version of the file.Damien George
2018-12-10stm32/uart: Add ability to have a static built-in UART object.Damien George
A static UART is useful for internal peripherals that require a UART and need to persist outside the soft-reset loop.
2018-12-10stm32/uart: Move config of char_width/char_mask to uart.c.Damien George
2018-12-10stm32/uart: For UART init, pass in params directly, not via HAL struct.Damien George
To provide a cleaner and more abstract C-level interface to the UART.
2018-12-10stm32/uart: Simplify deinit of UART, no need to call HAL.Damien George
The HAL just clears UE and then clears all the UART control registers.
2018-12-10stm32/uart: Remove HAL's UART_HandleTypeDef from UART object struct.Damien George
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-10stm32/uart: Factor out code to set RX buffer to function uart_set_rxbuf.Damien George
2018-12-10stm32/uart: Rework uart_get_baudrate so it doesn't need a UART handle.Damien George
2018-12-10stm32/uart: Factor out code from machine_uart.c that computes baudrate.Damien George
2018-12-10stm32: Split out UART Python bindings from uart.c to machine_uart.c.Damien George
2018-12-10py/objexcept: Make sure mp_obj_new_exception_msg doesn't copy/format msgDamien George
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-10py/objexcept: Use macros to make offsets in emergency exc buf clearer.Damien George
2018-12-10extmod/moductypes: Add aliases for native C types.Paul Sokolovsky
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-10tests/extmod/uctypes_error: Add test for unsupported unary op.Damien George
2018-12-10tests/extmod/uctypes_ptr_le: Test int() operation on a pointer field.Paul Sokolovsky
2018-12-10extmod/moductypes: Implement __int__ for PTR.Paul Sokolovsky
Allows to get address a pointer contains, as an integer.
2018-12-07tests/basics/special_methods: Add testcases for __int__.Paul Sokolovsky
2018-12-07py/obj: Add support for __int__ special method.Paul Sokolovsky
Based on the discussion, this special method is available unconditionally, as converting to int is a common operation.
2018-12-06py/objboundmeth: Support loading generic attrs from the method.Damien George
Instead of assuming that the method is a bytecode object, and only supporting load of __name__, make the operation generic by delegating the load to the method object itself. Saves a bit of code size and fixes the case of attempting to load __name__ on a native method, see issue #4028.
2018-12-06esp32/modmachine: Enable machine.sleep() now that the IDF supports it.Damien George
2018-12-06esp32/machine_pwm: On deinit stop routing PWM signal to the pin.Damien George
Fixes issue #4273.
2018-12-06esp32/machine_pwm: Support higher PWM freq by auto-scaling timer res.Damien George
2018-12-06esp32/machine_uart: Implement UART.sendbreak() method.Damien George
The uart_write_bytes_with_break() function requires non-zero data to be sent before the break, so a standalone break must be synthesised.
2018-12-06stm32/boards: Add NUCLEO_L432KC board configuration files.boochow
2018-12-06stm32: Add peripheral support for STM32L432.boochow
The L432 does not have: GPIOD, TIM3, SPI2, ADC dual mode operation, 2-banks flash.
2018-12-06stm32/boards: Add STM32L432KC chip configuration files.boochow
The pin alternate function information is derived from ST's datasheet https://www.st.com/resource/en/datasheet/stm32l432kc.pdf In the datasheet, the line 2 of AF4 includes I2C2 but actually the chip does not have I2C2 so it is removed.
2018-12-05esp8266/machine_uart: Add rxbuf keyword arg to UART constructor/init.Damien George
As per the machine.UART documentation, this is used to set the length of the UART RX buffer.
2018-12-05esp32/machine_uart: Add txbuf/rxbuf keyword args to UART construct/init.Damien George
As per the machine.UART documentation, these are used to set the length of the TX and RX buffers.
2018-12-05stm32/uart: Add rxbuf keyword arg to UART constructor and init method.Damien George
As per the machine.UART documentation, this is used to set the length of the RX buffer. The legacy read_buf_len argument is retained for backwards compatibility, with rxbuf overriding it if provided.
2018-12-05stm32/powerctrl: Add support for standby mode on L4 MCUs.Damien George
This maps to machine.deepsleep() which is now supported.
2018-12-04stm32/mboot: Add documentation for using mboot on PYBv1.x.Damien George
2018-12-04stm32/boards: Add configuration for putting mboot on PYBv1.x.Damien George
2018-12-04stm32/mboot: Add support for 4th board LED.Damien George
2018-12-04stm32/mboot: Provide led_state_all function to reduce code size.Damien George
2018-12-04stm32/uart: Always show the flow setting when printing a UART object.Damien George
Also change the order of printing of flow so it is after stop (so bits, parity, stop are one after the other), and reduce code size by using mp_print_str instead of mp_printf where possible. See issue #1981.
2018-12-04stm32,esp8266,cc3200: Use MICROPY_GC_STACK_ENTRY_TYPE to save some RAM.Damien George
2018-12-04py: Add option to reduce GC stack integer size to save RAM.Ayke van Laethem
A new option MICROPY_GC_STACK_ENTRY_TYPE is added to select a custom type instead of size_t for the gc_stack array items. This can be beneficial for small devices, especially those that are low on memory anyway. If a device has 1MB or less of heap (and 16-byte GC blocks) then this type can be uint16_t, saving 128 bytes of RAM.
2018-12-04esp8266/modnetwork: Wait for iface to go down before forcing power mgmt.Damien George
If the STA interface is connected to an AP then it must be fully disconnected and deactivated before forcing the power management on.
2018-12-04py/py.mk: Fix broken Gmane URL.Craig Younkins
2018-12-03extmod/modlwip: Fix read-polling of listening socket with a backlog.Damien George
The recent implementation of the listen backlog meant that the logic to test for readability of such a socket changed, and this commit updates the logic to work again.
2018-12-01stm32/boards/STM32F429DISC: Enable UART as secondary REPL.roland
The board(s) feature a VCOM through the ST-LINK, this feature is something to keep around.
2018-12-01extmod/modlwip: Implement TCP listen/accept backlog.Damien George
Array to hold waiting connections is in-place if backlog=1, else is a dynamically allocated array. Incoming connections are processed FIFO style to maintain fairness.
2018-12-01esp8266/modnetwork: Automatically do radio sleep if no interface active.Damien George
Reduces current of device by about 55mA when radio is sleeping.
2018-12-01esp8266/ets_alt_task: Process idle callback if no other events occurred.Damien George
2018-11-28esp32: Allocate task TCB and stack from system heap not uPy heap.Damien George
This is necessary for two reasons: 1) FreeRTOS still needs the TCB data structure even after vPortCleanUpTCB has been called, so this latter hook function cannot free the TCB, and there is no where else to safely delete it (this behaviour has changed recently in the ESP IDF); 2) when using external SPI RAM the uPy heap is in this external memory but the task stack must be allocated from internal SRAM. Fixes issue #3904.
2018-11-28esp32/mpthreadport: Prevent deadlocks when deleting all threads.Damien George
vTaskDelete now immediately calls vPortCleanUpTCB, which requires the thread_mutex mutex, so vTaskDelete must be called after this mutex is released.
2018-11-28stm32/powerctrl: Disable IRQs during stop mode to allow reconfig on wakeDamien George
2018-11-28stm32/powerctrl: Move (deep)sleep funcs from modmachine.c to powerctrl.cDamien George
2018-11-28stm32/usb: Fully deinitialise USB periph when it is deactivated.Damien George
2018-11-28stm32/servo: Only initialise TIM5 if it is needed, to save power.Damien George