summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* stmhal: NUCLEO 401 - Add definitions for I2C2 and I2C3Dave Hylands2016-02-10
|
* stmhal: CERB40 - Add pins defines for I2C3Dave Hylands2016-02-10
|
* stmhal: NUCLEO 401 - Add a bunch of missing pins and reorder the pinsDave Hylands2016-02-10
| | | | | This groups the pins for a port together and puts them in numerical order. It also adds ARDUINO pin names.
* stmhal: Add a function for setting the pin alternate functionDave Hylands2016-02-10
| | | | | | mp_hal_gpio_set_af will search for a given function and unit and set the alternate function to the alternate function index found.
* extmod/fsusermount: Move BP_IOCTL_xxx constants to fsusermount.h.Damien George2016-02-10
|
* extmod/fsusermount: Support mounting of multiple block devices.Damien George2016-02-10
| | | | | | | | | | | | | This patch adds support to fsusermount for multiple block devices (instead of just one). The maximum allowed is fixed at compile time by the size of the fs_user_mount array accessed via MP_STATE_PORT, which in turn is set by MICROPY_FATFS_VOLUMES. With this patch, stmhal (which is still tightly coupled to fsusermount) is also modified to support mounting multiple devices And the flash and SD card are now just two block devices that are mounted at start up if they exist (and they have special native code to make them more efficient).
* stmhal: Add mount/umount/mkfs to os module.Damien George2016-02-10
|
* extmod/fsusermount: Expose umount as a public function.Damien George2016-02-10
|
* stmhal: Expose flash and SD card as proper objects with block protocol.Damien George2016-02-10
| | | | | | | | | | You can now create (singleton) objects representing the flash and SD card, using: flash = pyb.Flash() sdcard = pyb.SDCard() These objects provide the block protocol.
* tests/pyb: Add simple test for stm module on pyboard.Damien George2016-02-10
|
* extmod/modmachine: Truncate integers that are to be stored using mem*.Damien George2016-02-10
| | | | Addresses issue #1835.
* stmhal: Improve NUCLEO-F401RE build, with UART2 as REPL.Dave Hylands2016-02-10
| | | | | | | | This enables MICROPY_HW_HAS_FLASH which got missed. The HW has UART2 on the 401 connected to the STLINK procesor which exposes it as USB serial. This connects that up so that you can get a REPL using the USB serial.
* lib/fatfs: Add support for sector sizes larger than 512 bytes.Damien George2016-02-10
| | | | | | | | | If MICROPY_FATFS_MAX_SS is defined to power of 2 value between 1024 and 4096, support for dynamic sector size in FatFs will be enabled. Note that FatFs reserves static buffer of MICROPY_FATFS_MAX_SS size for each filesystem in use, so that value should be set sparingly. Initial patch provided by @pfalcon.
* extmod/fsusermount: Change block protocol to support ioctl method.Damien George2016-02-10
| | | | | | | | | | | | | The new block protocol is: - readblocks(self, n, buf) - writeblocks(self, n, buf) - ioctl(self, cmd, arg) The new ioctl method handles the old sync and count methods, as well as a new "get sector size" method. The old protocol is still supported, and used if the device doesn't have the ioctl method.
* extmod/fsusermount: Implement separate umount() function.Paul Sokolovsky2016-02-10
|
* extmod/fsusermount: Introduce separate mkfs() function.Paul Sokolovsky2016-02-10
| | | | | | Per the previously discussed plan. mount() still stays backward-compatible, and new mkfs() is rought and takes more args than needed. But is a step in a forward direction.
* py/viper: Allow uint as index to load/store, and give better error msg.Damien George2016-02-09
|
* py/viper: Allow casting of Python integers to viper pointers.Damien George2016-02-09
| | | | | | | | | This allows you to pass a number (being an address) to a viper function that expects a pointer, and also allows casting of integers to pointers within viper functions. This was actually the original behaviour, but it regressed due to native type identifiers being promoted to 4 bits in width.
* esp8266/README: Add hint about adding toolchain to PATH.Paul Sokolovsky2016-02-08
|
* esp8266/modpybrtc: pyb_rtc_memory(): Fix copy-paste error.Paul Sokolovsky2016-02-08
|
* esp8266/modesp: Implement flash_write(), flash_erase().Alex March2016-02-08
|
* cc3200: Add stmhal/builtin_open.c to build.Paul Sokolovsky2016-02-07
|
* stmhal/file: For self-contained usecase, don't define global types.Paul Sokolovsky2016-02-07
| | | | | | | | | If MICROPY_VFS_FAT is defined, mp_type_fileio & mp_type_textio won't be defined, as these may be alredy defined elsewhere. The idea is to have compartmentalized VFS FatFs class, which can work in parallel with some other "main" filesystem. E.g., for unix port, mp_type_fileio, etc. will be defined for the main POSIX filesystem, while stmhal/file.c will be a self-contained VFS file class.
* stmhal/file: Recast as "FatFs file" class, to support other VFS types.Paul Sokolovsky2016-02-07
| | | | | | Move definition of mp_builtin_open_obj to a separate module, then file.c becomes more or less compartmentalized FatFs file class, which can be used together with file class implementations for other (V)FSes.
* extmod/fsusermount: Common subexpression elimination.Paul Sokolovsky2016-02-06
| | | | Don't repeat MP_STATE_PORT(fs_user_mount), use local var.
* tests/open_plus: Add tests for "r+", "w+" open modes.Paul Sokolovsky2016-02-06
|
* unix/file: Stop assuming that O_RDWR == O_RDONLY | O_WRONLY.Paul Sokolovsky2016-02-06
| | | | That's not true e.g. on Linux.
* stmhal: Move stmhal-specific FatFs routines/structs to fatfs_port.c.Paul Sokolovsky2016-02-06
|
* stmhal/diskio: Introduce MICROPY_HW_HAS_FLASH setting.Paul Sokolovsky2016-02-06
| | | | | To allow to reuse stmhal/diskio for ports which don't have flash but have other storage devices.
* py/mpz: Add commented-out mpz_pow3_inpl function, to compute (x**y)%z.Damien George2016-02-03
| | | | | | | This function computes (x**y)%z in an efficient way. For large arguments this operation is otherwise not computable by doing x**y and then %z. It's currently not used, but is added in case it's useful one day.
* py/mpz: Complete implementation of mpz_{and,or,xor} for negative args.Doug Currie2016-02-03
| | | | | | | | | | | | For these 3 bitwise operations there are now fast functions for positive-only arguments, and general functions for arbitrary sign arguments (the fast functions are the existing implementation). By default the fast functions are not used (to save space) and instead the general functions are used for all operations. Enable MICROPY_OPT_MPZ_BITWISE to use the fast functions for positive arguments.
* py: Extend native type-sig to use 4 bits, so uint is separate to ptr.Damien George2016-02-02
| | | | | | | Before this patch, the native types for uint and ptr/ptr8/ptr16/ptr32 all overlapped and it was possible to make a mistake in casting. Now, these types are all separate and any coding mistakes will be raised as runtime errors.
* py/objstr: Make mp_obj_str_format_helper static.Damien George2016-02-02
|
* py/objstr: For str.format, don't allocate on the heap for field name.Damien George2016-02-02
|
* py/objstr: For str.format, add nested/computed fields support.pohmelie2016-02-02
| | | | | | | Eg: '{:{}}'.format(123, '>20') @pohmelie was the original author of this patch, but @dpgeorge made significant changes to reduce code size and improve efficiency.
* drivers/sdcard: Add support for multi-block read/write; add SD test.Peter Hinch2016-02-02
|
* extmod: Update uzlib to 1.2.2.Paul Sokolovsky2016-02-01
| | | | Fixes use of uninitialized structure field by tinf_uncompress().
* py/vm: Fix popping of exception block in UNWIND_JUMP opcode.Damien George2016-02-01
| | | | Fixes issue #1812.
* py/mpprint: Fix sign extension when printf'ing %u, %x and %X.Damien George2016-02-01
|
* docs: Bump version to 1.6.v1.6Damien George2016-01-31
|
* tests: For pyboard, add test for I2C error handling and recovery.Damien George2016-01-30
|
* stmhal: Update HALCOMMITS due to change to hal.Damien George2016-01-30
|
* stmhal: In HAL I2C driver, move DMA setup to after sending I2C address.Damien George2016-01-30
| | | | | | | | | | | Previous to this patch the DMA was setup and then the I2C address sent. If the I2C address sending failed (eg no I2C device on the bus) then the DMA was left in an inconsistent state. This patch moves the DMA setup to after a successful sending of the I2C address(es). See issue #1765.
* tests: Update pyboard LED test.Damien George2016-01-29
|
* docs: Update to say that Timer(3) is free, and detail LED intensity.Damien George2016-01-29
|
* stmhal: Add PWM capability for LED(3) and LED(4) on pyboards.Damien George2016-01-29
| | | | | | | | | | | | | | | | | USB CDC no longer needs TIM3 (which was originally used for LED(4) PWM) and so TIM3 has been freed for general purpose use by the user. Hence LED(4) lost its PWM capabilities. This patch reinstates the PWM capabilities using a semi-generic piece of code which allows to configure a timer and PWM channel to use for any LED. But the PWM capability is only configured if the LED is set to an intensity between 1 and 254 (ie only when needed). In that case the relevant timer is configured for PWM. It's up to the user to make sure the timers are not used if PWM is active. This patch also makes sure that PWM LEDs are turned off using standard GPIO when calling led.off() or led.intensity(0), instead of just setting the PWM counter to zero.
* stmhal: Make TIM3 available for use by the user.Damien George2016-01-29
| | | | | | | TIM3 is no longer used by USB CDC for triggering outgoing data, so we can now make it available to the user. PWM fading on LED(4) is now gone, but will be reinstated in a new way.
* stmhal: Make USB CDC driver use SOF instead of TIM3 for outgoing data.Damien George2016-01-29
| | | | | | | | | | | | Previous to this patch the USB CDC driver used TIM3 to trigger the sending of outgoing data over USB serial. This patch changes the behaviour so that the USB SOF interrupt is used to trigger the processing of the sending. This reduces latency and increases bandwidth of outgoing data. Thanks to Martin Fischer, aka @hoihu, for the idea and initial prototype. See PR #1713.
* py/formatfloat: Add ability to format doubles with exponents > 99.Damien George2016-01-29
| | | | | | | | For single prec, exponents never get larger than about 37. For double prec, exponents can be larger than 99 and need 3 bytes to format. This patch makes the number of bytes needed configurable. Addresses issue #1772.
* py/runtime: mp_stack_ctrl_init() should be called immediately on startup.Paul Sokolovsky2016-01-29
| | | | | | | | | Calling it from mp_init() is too late for some ports (like Unix), and leads to incomplete stack frame being captured, with following GC issues. So, now each port should call mp_stack_ctrl_init() on its own, ASAP after startup, and taking special precautions so it really was called before stack variables get allocated (because if such variable with a pointer is missed, it may lead to over-collecting (typical symptom is segfaulting)).