summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal
Commit message (Collapse)AuthorAge
* all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros.Damien George2017-08-21
|
* all: Raise exceptions via mp_raise_XXXJavier Candeira2017-08-13
| | | | | | | | - Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
* all: Make use of $(TOP) variable in Makefiles, instead of "..".Damien George2017-08-11
| | | | | $(TOP) is defined in py/mkenv.mk and should be used to refer to the top level of this repository.
* py,extmod,stmhal: Use "static inline" for funcs that should be inline.Damien George2017-08-02
| | | | | "STATIC inline" can expand to "inline" if STATIC is defined to nothing, and this case can lead to link errors.
* all: Use the name MicroPython consistently in commentsAlexander Steffen2017-07-31
| | | | | There were several different spellings of MicroPython present in comments, when there should be only one.
* all: Remove trailing spaces, per coding conventions.Damien George2017-07-19
|
* stmhal: Clean up USB CDC/MSC files and remove commented-out code.Damien George2017-07-19
|
* all: Unify header guard usage.Alexander Steffen2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code conventions suggest using header guards, but do not define how those should look like and instead point to existing files. However, not all existing files follow the same scheme, sometimes omitting header guards altogether, sometimes using non-standard names, making it easy to accidentally pick a "wrong" example. This commit ensures that all header files of the MicroPython project (that were not simply copied from somewhere else) follow the same pattern, that was already present in the majority of files, especially in the py folder. The rules are as follows. Naming convention: * start with the words MICROPY_INCLUDED * contain the full path to the file * replace special characters with _ In addition, there are no empty lines before #ifndef, between #ifndef and one empty line before #endif. #endif is followed by a comment containing the name of the guard macro. py/grammar.h cannot use header guards by design, since it has to be included multiple times in a single C file. Several other files also do not need header guards as they are only used internally and guaranteed to be included only once: * MICROPY_MPHALPORT_H * mpconfigboard.h * mpconfigport.h * mpthreadport.h * pin_defs_*.h * qstrdefs*.h
* stmhal/servo: Don't compile servo code when it's not enabled.Damien George2017-07-14
|
* stmhal/pin_named_pins: Remove unreachable print function.Damien George2017-07-14
| | | | | There are never any instances of these objects so there is no need to have a print function.
* stmhal/servo: Make pyb.Servo(n) map to Pin('Xn') on all MCUs.Damien George2017-07-14
| | | | | | Prior to this patch Servo numbers 1, 2, 3, 4 mapped to pins X3, X4, X1, X2 on PYBLITE which doesn't match the standard PYB mapping. This patch fixes the mapping.
* stmhal: Reduce size of ESPRUINO_PICO build so it fits in flash.Damien George2017-07-12
| | | | | | | The default frozen modules are no longer included (but users can still specify their own via FROZEN_MPY_DIR), complex numbers are disabled and so are the native, viper and asm_thumb emitters. Users needing these features can tune the build to disable other things.
* stmhal/boards/NUCLEO_F429ZI: Change USB config from HS to FS peripheral.Damien George2017-07-04
| | | | | This dev board only has a single USB connector, connected to the FS peripheral.
* stmhal: Clean up some header includes.Damien George2017-07-03
|
* stmhal/boards: Add configuration files for NUCLEO_F429ZI.Alberto Petrucci2017-07-03
|
* stmhal/mpconfigport.h: Allow MICROPY_PY_THREAD to be overridden.Damien George2017-06-28
|
* stmhal/Makefile: Add CFLAGS_EXTRA to CFLAGS so cmdline can add options.Damien George2017-06-28
|
* stmhal/Makefile: Rename FLOAT_IMPL to MICROPY_FLOAT_IMPL to match C nameDamien George2017-06-28
| | | | | The name used in py/mpconfig.h is MICROPY_FLOAT_IMPL so rename this Makefile variable to mirror that.
* stmhal/Makefile: Use hardware double-prec FP for MCUs that support it.Damien George2017-06-28
|
* stmhal/boards: Enable double-prec FP on F76x boards.Damien George2017-06-28
|
* stmhal: Add possibility to build with double-precision floating point.Damien George2017-06-28
| | | | | | | | By default the firmware is built with single-precision floating point. To build a particular board using double precision instead, put the following line in the mpconfigboard.mk file: FLOAT_IMPL = double
* stmhal/sdcard: Allow a board to customise the SDIO pins.Benjamin Weps2017-06-27
|
* stmhal/boards/stm32f405.ld: Increase FLASH_TEXT to end of 1MiB flash.Damien George2017-06-26
| | | | | | | And and FLASH_FS, and use "K" values instead of hex numbers for lengths. The increase of FLASH_TEXT is to allow more frozen bytecode for a particular user's project. It's not used for anything else.
* stmhal/modules: Provide sym-link to onewire.py driver.Damien George2017-06-22
|
* stmhal: Make available the _onewire module, for low-level bus control.Damien George2017-06-22
|
* stmhal: Add "quiet timing" enter/exit functions.Damien George2017-06-22
| | | | | They disable all interrupts except for SysTick and are useful for doing certain low-level timing operations.
* stmhal: Move pybstdio.c to lib/utils/sys_stdio_mphal.c for common use.Damien George2017-06-15
| | | | | It provides sys.stdin, sys.stdout, sys.stderr for bare-metal targets based on mp_hal functions.
* stmhal: Add .value() method to Switch object, to mirror Pin and Signal.Damien George2017-06-15
|
* stmhal: Add initial implementation of Pin.irq() method.Damien George2017-06-15
| | | | | | This method follows the new HW API and allows to set a hard or soft IRQ callback when a Pin has a level change. It still remains to make this method return a IRQ object.
* stmhal: Make error messages more consistent across peripherals.Damien George2017-06-15
|
* all: Make more use of mp_raise_{msg,TypeError,ValueError} helpers.Damien George2017-06-15
|
* stmhal/mpconfigport.h: Remove config of PY_THREAD_GIL to use default.Damien George2017-06-14
| | | | | The default for the GIL is to enable it if threading is enabled, and this is the recommended way to use threading with the stmhal port.
* stmhal/usbdev: For MSC implement SCSI SYNCHRONIZE_CACHE command.Damien George2017-06-08
| | | | | Currently just a dummy command that returns "success", but it's needed for some O/S's to correctly talk with the SCSI layer.
* stmhal/usb: Make state for USB device private to top-level USB driver.Damien George2017-06-07
|
* stmhal/usb: Use local USB handler variable in Start-of-Frame handler.Sylvain Pelissier2017-06-07
|
* stmhal: Pass USB handler as parameter to allow more than one USB handlerSylvain Pelissier2017-06-07
|
* stmhal: Add support for NUCLEO_F446RE board.Dave Hylands2017-06-07
|
* ports: Convert from using stmhal's input() to core provided version.Damien George2017-06-01
|
* stmhal/boards: Enable DAC for NUCLEO_F767ZI board.Damien George2017-05-30
|
* esp8266, stmhal, zephyr: Rename machine.Pin high/low methods to on/off.Paul Sokolovsky2017-05-21
| | | | | | | | | For consistent Pin/Signal class hierarchy. With it, Signal is a proper (while still ducktyped) subclass of a Pin, and any (direct) usage of Pin can be replace with Signal. As stmhal's class is reused both as machine.Pin and legacy pyb.Pin, high/low methods actually retained there.
* stmhal/modmachine: Remove TODO comment that is now implemented.Damien George2017-05-16
|
* stmhal/modmachine: Add machine.UART class, linking to pyb.UART.Damien George2017-05-16
| | | | | pyb.UART has a superset of machine.UART functionality so can be used to provide compatibility with other ports that also implement machine.UART.
* ports: Add ilistdir in uos module.Damien George2017-05-10
|
* stmhal: Convert all module and method tables to use MP_ROM macros.Damien George2017-05-06
|
* qemu-arm, stmhal: Remove dummy memory.h since it's no longer needed.Damien George2017-04-28
| | | | | extmod/crypto-algorithms/sha256.c was recently fixed so that it didn't include this header.
* mpy-cross, unix, windows, stmhal: Enable return-if-else optimisation.Damien George2017-04-22
| | | | | | Prior to making this a config option it was previously available on these (and all other) ports, and it makes sense to keep it enabled for mpy-cross as well as ports that have a decent amount of space for the code.
* stmhal/timer: Clear interrupt flag before setting callback.Henrik Sölver2017-04-18
| | | | | | | | | | Sometimes when setting a channel callback the callback fires immediately, even if the compare register is set to a value far into the future. This happens when the free running counter has previously been equal to what happens to be in the compare register. This patch make sure that there is no pending interrupt when setting a callback.
* stmhal: Enable parsing of all Pin constructor args by machine.Signal.Damien George2017-04-11
|
* stmhal/usbd_cdc_interface: Change CDC RX to use a circular buffer.Damien George2017-04-04
| | | | | | | | This should be a little more efficient (since we anyway scan the input packet for the interrupt char), and it should also fix any non-atomic read issues with the buffer state being changed during an interrupt. Throughput tests show that RX rate is unchanged by this patch.
* stmhal/usbd_cdc_interface: Increase in-endpoint timeout to 500ms.Damien George2017-04-04
| | | | | | | The previous timeout value of 150ms could lead to data being lost (ie never received by the host) in some rare cases, eg when the host is under load. A value of 500ms is quite conservative and allows the host plenty of time to read our data.