summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-24stm32: Rename legacy pyb.I2C helper functions to start with pyb_i2c_.Damien George
2018-04-24stm32: Rename i2c.c to pyb_i2c.c.Damien George
i2c.c implements the legacy pyb.I2C class so rename the file to make this explicit, and also to make room for an improved I2C driver.
2018-04-24stm32/dac: Support MCUs that don't have TIM4/5 and use new HAL macro.Damien George
2018-04-24stm32: Introduce MICROPY_PY_STM config to include or not the stm module.Damien George
By default the stm module is included in the build, but a board can now define MICROPY_PY_STM to 0 to not include this module. This reduces the firmware by about 7k.
2018-04-23stm32/uart: Allow ctrl-C to work with UARTs put on REPL via os.dupterm.Damien George
2018-04-23stm32/uart: Allow ctrl-C to issue keyboard intr when REPL is over UART.Damien George
2018-04-23stm32/boards/NUCLEO_H743ZI: Enable RNG for this board.iabdalkader
2018-04-23stm32/rng: Set RNG clock source for STM32H7.iabdalkader
2018-04-23extmod/modlwip: Check if getaddrinfo() constraints are supported or not.Damien George
In particular don't issue a warning if the passed-in constraints are actually supported because they are the default values.
2018-04-23tools/upip: Upgrade upip to 1.2.4.Damien George
Uses new pypi.org URL, and now creates a socket with the address parameters returned by getaddrinfo().
2018-04-20esp32/README.md: Fix typo readme.Shanee Vanstone
2018-04-20stm32/sdcard: Implement BP_IOCTL_SEC_COUNT to get size of SD card.Peter D. Gray
2018-04-20docs/library/pyb.ADC: Fix typo of "prarmeter".Damien George
2018-04-20docs/library/pyb.ADC: Remove outdated ADCAll code example.Peter Hinch
2018-04-11tests/pyb: Add test for pyb.ADCAll class.Damien George
2018-04-11stm32/main: Allow a board to configure the label of the flash FS.Damien George
To change the default label a board should define: #define MICROPY_HW_FLASH_FS_LABEL "label"
2018-04-11stm32: Allow a board to configure the HSE in bypass mode.Damien George
To use HSE bypass mode the board should define: #define MICROPY_HW_CLK_USE_BYPASS (1) If this is not defined, or is defined to 0, then HSE oscillator mode is used.
2018-04-11stm32/stm32_it: Add IRQ handler for I2C4.Damien George
2018-04-11stm32/can: Allow CAN pins to be configured per board.Damien George
This patch allows a given board to configure which pins are used for the CAN peripherals, in a similar way to all the other bus peripherals (I2C, UART, SPI). To enable CAN on a board the mpconfigboard.h file should define (for example): #define MICROPY_HW_CAN1_TX (pin_B9) #define MICROPY_HW_CAN1_RX (pin_B8) #define MICROPY_HW_CAN2_TX (pin_B13) #define MICROPY_HW_CAN2_RX (pin_B12) And the board config file should no longer define MICROPY_HW_ENABLE_CAN.
2018-04-11stm32/pin: In pin AF object, remove union of periph ptr types.Damien George
The individual union members (like SPI, I2C) are never used, only the generic "reg" entry is. And the union names can clash with macro definitions in the HAL so better to remove them.
2018-04-11stm32/adc: Factor common ADC init code into adcx_init_periph().Damien George
The only configuration that changes with this patch is that on L4 MCUs the clock prescaler changed from ADC_CLOCK_ASYNC_DIV2 to ADC_CLOCK_ASYNC_DIV1 for the ADCAll object. This should be ok.
2018-04-11stm32/adc: Fix config of EOC selection and Ext-Trig for ADC periph.Damien George
A value of DISABLE for EOCSelection is invalid. This would have been interpreted instead as ADC_EOC_SEQ_CONV, but really it should be ADC_EOC_SINGLE_CONV for the uses in this code. So this has been fixed. ExternalTrigConv should be ADC_SOFTWARE_START because all ADC conversions are started by software. This is now fixed.
2018-04-11stm32/adc: Factor code to optimise adc_read_channel and adc_read.Damien George
Saves 200 bytes of code space.
2018-04-11stm32/dac: Add buffering argument to constructor and init() method.Damien George
This can be used to select the output buffer behaviour of the DAC. The default values are chosen to retain backwards compatibility with existing behaviour. Thanks to @peterhinch for the initial idea to add this feature.
2018-04-11stm32/adc: Optimise read_timed_multi() by caching buffer pointers.Damien George
2018-04-11stm32/adc: Add read_timed_multi() static method, with docs and tests.Peter Hinch
2018-04-11tests/pyb/adc.py: Fix test so that it really does test ADC values.Damien George
Reading into a bytearray will truncate values to 0xff so the assertions checking read_timed() would previously always succeed. Thanks to @peterhinch for finding this problem and providing the solution.
2018-04-11stm32/adc: Fix verification of ADC channel 16 for F411 MCUs.Damien George
2018-04-10stm32/main: Guard usb_mode lines in default boot.py by relevant #if.Peter D. Gray
2018-04-10esp32/machine_uart: Remove UART event queue object.Damien George
This event queue has UART events posted to it and they need to be drained for it to operate without error. The queue is not used by the uPy UART class so it should be removed to prevent the IDF emitting errors. Fixes #3704.
2018-04-10py: Refactor how native emitter code is compiled with a file per arch.Damien George
Instead of emitnative.c having configuration code for each supported architecture, and then compiling this file multiple times with different macros defined, this patch adds a file per architecture with the necessary code to configure the native emitter. These files then #include the emitnative.c file. This simplifies emitnative.c (which is already very large), and simplifies the build system because emitnative.c no longer needs special handling for compilation and qstr extraction.
2018-04-10tests: Move recursive tests to the tests/stress/ subdir.Damien George
Keeping all the stress related tests in one place makes it easier to stress-test a given port, and to also not run such tests on ports that can't handle them.
2018-04-10tests/stress/recursive_gen: Add test for recursive gen with iter.Damien George
2018-04-10stm32/i2c: Fully support peripheral I2C4.Damien George
2018-04-10stm32/i2c: Update HAL macros to use new __HAL_RCC prefix.Damien George
2018-04-10stm32/boards/NUCLEO_H743ZI: Enable DAC peripheral.iabdalkader
2018-04-10stm32/dac: Add support for H7 MCUs.iabdalkader
Includes a fix for H7 DAC DMA requests.
2018-04-10py/objgenerator: Check stack before resuming a generator.Jeff Epler
This turns a hard crash in a recursive generator into a 'maximum recursion depth exceeded' exception.
2018-04-10extmod/re1.5: Fix compilecode.c compile problem on IAR tool chain.armink
The 2nd and 3rd args of the ternary operator are treated like they are in the same expression and must have similar types. void is not compatible with int so that's why the compiler is complaining.
2018-04-10py/stream: Switch stream close operation from method to ioctl.Damien George
This patch moves the implementation of stream closure from a dedicated method to the ioctl of the stream protocol, for each type that implements closing. The benefits of this are: 1. Rounds out the stream ioctl function, which already includes flush, seek and poll (among other things). 2. Makes calling mp_stream_close() on an object slightly more efficient because it now no longer needs to lookup the close method and call it, rather it just delegates straight to the ioctl function (if it exists). 3. Reduces code size and allows future types that implement the stream protocol to be smaller because they don't need a dedicated close method. Code size reduction is around 200 bytes smaller for x86 archs and around 30 bytes smaller for the bare-metal archs.
2018-04-10docs/library/pyb.ADC.rst: Document new features for ADCAll.T S
2018-04-05py/objstr: In find/rfind, don't crash when end < start.Jeff Epler
2018-04-05tests/micropython/extreme_exc.py: Allow to run without any emg exc buf.Damien George
2018-04-05tests/micropython/extreme_exc.py: Fix test to run on more ports/configs.Damien George
2018-04-05py/objint: Simplify LHS arg type checking in int binary op functions.Damien George
The LHS passed to mp_obj_int_binary_op() will always be an integer, either a small int or a big int, so the test for this type doesn't need to include an "other, unsupported type" case.
2018-04-05tests/micropython: Add set of tests for extreme cases of raising exc's.Damien George
2018-04-05tests/basics/string_compare.py: Add test with string that hashes to 0.Damien George
The string "Q+?" is special in that it hashes to zero with the djb2 algorithm (among other strings), and a zero hash should be incremented to a hash of 1.
2018-04-05tests/basics/class_super.py: Add tests for store/delete of super attr.Damien George
2018-04-05tests/basics: Add tests for edge cases of nan-box's 47-bit small int.Damien George
2018-04-04tests/basics: Add test for subclassing an iterable native type.Damien George