summaryrefslogtreecommitdiff
path: root/stmhal
AgeCommit message (Collapse)Author
2015-04-18stmhal: Add support for sending and receiving CAN RTR messages.Henrik
2015-04-18stmhal: Remove std.h. It's not needed anymore.Damien George
2015-04-16stmhal: Allow sending CAN messages with timeout=0.Damien George
Thanks to Henrik Sölver for this patch.
2015-04-16stmhal: Use new %q format to print qstr's in a few more places.blmorris
Saves 68 bytes.
2015-04-16py: Overhaul and simplify printf/pfenv mechanism.Damien George
Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs.
2015-04-13stmhal: In USB HID driver, make polling interval configurable.Damien George
When setting usb_mode to "HID", hid config object now has polling-interval (in ms) as the 4th element. It mmust now be a 5-tuple of the form: (subclass, protocol, max_packet_len, polling_interval, report_desc) The mouse and keyboard defaults have polling interval at 8ms.
2015-04-11stmhal: Make LED object print LED(x) for consistency with constructor.Damien George
2015-04-05string0.c: Move from stmhal/ to lib/.Paul Sokolovsky
2015-04-04stmhal, qemu-arm: Enable sys.maxsize attribute.Damien George
2015-04-04stmhal: Enable new str.splitlines() method.Damien George
2015-03-29lib: Update FatFs to R0.11.Daniel Campora
There are lots of cosmetic changes, but this release brings a very important bug fix: - Fixed f_unlink() does not remove cluster chain of the file. With R0.10c if you try to write a file that is too large to fit in the free space of the drive, the operation fails, you delete the incomplete file, and it seems to be erased, but the space is not really freed, because any subsequent write operations fail because the drive is "still" full. The only way to recover from this is by formatting the drive. I can confirm that R0.11 fixes the problem.
2015-03-23stmhal: Optimise ADC.read_timed() so that it can sample up to 750kHz.Damien George
2015-03-22stmhal: Correctly clear wake-up flag before entering standby mode.Damien George
2015-03-22stmhal: Expose all PYBv1.0 pins, include SD and USB pins.Damien George
To have proper low power mode, need to configure all unused pins in input mode, so need to have them available.
2015-03-22stmhal: Put flash in deep power-down mode when entering stop mode.Damien George
This can get PYBv1.0 stop current down to around 290uA.
2015-03-20stmhal: Fix a bug related to unhandled channel interrupts.Dave Hylands
This also cleans up spurious interrupts which happen at timer initilaization time.
2015-03-20py: Allow retrieving a function's __name__.stijn
Disabled by default. Enabled on unix and stmhal ports.
2015-03-20stmhal: Remove some unnecessary declarations, purely for cleanup.Damien George
2015-03-20py: Implement core of OrderedDict type.Paul Sokolovsky
Given that there's already support for "fixed table" maps, which are essentially ordered maps, the implementation of OrderedDict just extends "fixed table" maps by adding an "is ordered" flag and add/remove operations, and reuses 95% of objdict code, just making methods tolerant to both dict and OrderedDict. Some things are missing so far, like CPython-compatible repr and comparison. OrderedDict is Disabled by default; enabled on unix and stmhal ports.
2015-03-16stmhal: Add config option to use LSE/LSI for RTC.Damien George
Most boards (except the pyboard) don't have a 32kHz crystal so they should use the LSI for the RTC.
2015-03-15stmhal: Add rtc.wakeup method, to set wakeup timer.Damien George
This allows to wake from low-power modes at a regular interval. This method is preliminary, pending testing and API overhaul.
2015-03-14py: Add MICROPY_COMP_{DOUBLE,TRIPLE}_TUPLE_ASSIGN config options.Damien George
These allow to fine-tune the compiler to select whether it optimises tuple assignments of the form a, b = c, d and a, b, c = d, e, f. Sensible defaults are provided.
2015-03-13stmhal: Fix adc.read_timed so buffer store respects element size.Damien George
Addresses issue #1154.
2015-03-09stmhal: Add support for quadrature encoder mode to pyb.TimerChannel.Dave Hylands
2015-03-04stmhal: Make os.sync use disk_ioctl exclusively; reuse os.sync in pyb.Damien George
2015-03-04stmhal: Include fatfs headers using lib/fatfs prefix.Damien George
This helps make files reusable across other ports.
2015-03-02stmhal: Enable MICROPY_PY_ARRAY_SLICE_ASSIGN.Damien George
2015-03-01stmhal: Add I2S2EXT and I2S3EXT constants to stm module.Damien George
2015-02-27py: Use m_{new,renew,del} consistently.Damien George
This is so all memory requests go through the same interface.
2015-02-23stmhal: Reset state of timer when deinit is called.Damien George
2015-02-22stmhal: Fix problem when passing callback= to timer init function.Dave Hylands
In particular, make sure that the globals are all initialized before enabling the interrupt, and also make sure that the timer interrupt has been initialied before enabling the NVIC.
2015-02-22py: Make math special functions configurable and disabled by default.Damien George
The implementation of these functions is very large (order 4k) and they are rarely used, so we don't enable them by default. They are however enabled in stmhal and unix, since we have the room.
2015-02-22lib/libm: Add implementations of erf, erfc, lgamma, tgamma.Damien George
2015-02-22stmhal: For UART, check that baudrate is within 5% of desired value.Damien George
Also includes documentation about minimum baudrate. Addresses issue #1090.
2015-02-15stmhal: Add support for CAN rx callbacks.Henrik Sölver
2015-02-13stmhal: Fix setting of VID.Damien George
2015-02-13stmhal: Add uart.sendbreak() method, to send a break condition.Damien George
2015-02-13minimal: Allow to compile without defining MICROPY_HAL_H.Damien George
2015-02-13stmhal: Make pybstdio usable by other ports, and use it.Damien George
Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
2015-02-13stmhal: Remove obsolete usbdev file.Damien George
2015-02-13stmhal: Coding style cleanup in usbd_cdc_msc_hid.c.Damien George
2015-02-13stmhal: Properly define pyb.usb_mode() semantics.Damien George
2015-02-13stmhal: Put CDC last in config descriptors to match with iface nums.Damien George
Apparently the order of interface numbers should be sequential and increasing in a config descriptor. So as to retain compatibility with Windows drivers for the CDC+MSC and CDC+HID modes, we move the CDC configs to the end of the descriptors, instead of changing the interface numbers. See PR #957 for background.
2015-02-13stmhal: Add "CDC" option to pyb.usb_mode, for CDC device only.Damien George
2015-02-13stmhal: Add Python-configurable USB HID mode.Damien George
Different HID modes can be configured in Python. You can either use predefined mouse or keyboard, or write your own report descriptor.
2015-02-13stmhal: Remove unused usbdev files, and move used ones up a dir.Damien George
The unused files are from the ST demos for different USB classes and are not needed for the stmhal port.
2015-02-13stmhal: Properly deinit timer object.Damien George
Addresses issue #1113.
2015-02-11stmhal: Fix ADC multiplier from 4096 to 4095; optimise fp operation.Damien George
2015-02-10stmhal: Add boot.py and main.py to qstr definitions, to save some RAM.Damien George
2015-02-08stmhal: Change type of received chr from char to int.Damien George