- 04 Dec, 2015 6 commits
-
-
Damien George authored
This is a hack to free up TIM3 so that it can be used by the user. Instead we use the PVD irq to call the USB VCP polling function, and trigger it from SysTick (so SysTick itself does not do any processing). The feature is enabled for pyboard lite only, since it lacks timers.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Consider the following scenario: SD card is being read by pyboard; USB irq comes in for MSC read request; SD card needs to be read from within USB irq while SD read is already ongoing. Such contention needs to be avoided. This patch provides a simple solution, to raise the irq priority above that of the USB irq during SD DMA transfers. Pyboard and PC can now read from the SD card at the same time (well, reads are interleaved).
-
Damien George authored
These can be used to disable only certain interrupts, ones at or above the given priority value.
-
- 03 Dec, 2015 2 commits
-
-
Paul Sokolovsky authored
-
Damien George authored
Addresses issue #1678.
-
- 02 Dec, 2015 7 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Dave Hylands authored
-
Paul Sokolovsky authored
-
Damien George authored
-
fabien.lementec authored
-
- 01 Dec, 2015 1 commit
-
-
Paul Sokolovsky authored
As set by signal handler. This assumes that exception will be raised somewhere else, which so far doesn't happen for single function call. Still, it makes sense to handle that in some common place.
-
- 30 Nov, 2015 2 commits
-
-
Damien George authored
In non-blocking mode (timeout=0), uart.write() can now transmit all of its data without raising an exception. uart.read() also works correctly in this mode. As part of this patch, timout_char now has a minimum value which is long enough to transfer 1 character. Addresses issue #1533.
-
Ryan Shaw authored
-
- 29 Nov, 2015 15 commits
-
-
Paul Sokolovsky authored
-
danicampora authored
-
Damien George authored
To use, put the following in mpconfigport.h: #define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_D) #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE) typedef int64_t mp_int_t; typedef uint64_t mp_uint_t; #define UINT_FMT "%llu" #define INT_FMT "%lld" Currently does not work with native emitter enabled.
-
Damien George authored
This allows the mp_obj_t type to be configured to something other than a pointer-sized primitive type. This patch also includes additional changes to allow the code to compile when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of mp_uint_t, and various casts.
-
Damien George authored
-
Damien George authored
The GC works with concrete pointers and so the types should reflect this.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
THis is required to deal well with signals, signals being the closest analogue of hardware interrupts for POSIX. This is also CPython 3.5 compliant behavior (PEP 475). The main problem implementing this is to figure out how much time was spent in waiting so far/how much is remaining. It's well-known fact that Linux updates select()'s timeout value when returning with EINTR to the remaining wait time. Here's what POSIX-based standards say about this: (http://pubs.opengroup.org/onlinepubs/9699919799/functions/pselect.html): "Upon successful completion, the select() function may modify the object pointed to by the timeout argument." I.e. it allows to modify timeout value, but doesn't say how exactly it is modified. And actually, it allows such modification only "upon successful completion", which returning with EINTR error hardly is. POSIX also allows to request automatic EINTR restart for system calls using sigaction call with SA_RESTART flag, but here's what the same document says about it: "If SA_RESTART has been set for the interrupting signal, it is implementation-defined whether the function restarts or returns with [EINTR]." In other words, POSIX doesn't leave room for both portable and efficient handling of this matter, so the code just allows to manually select Linux-compatible behavior with MICROPY_SELECT_REMAINING_TIME option, or otherwise will just raise OSError. When systems with non-Linux behavior are found, they can be handled separately.
-
Paul Sokolovsky authored
-
- 28 Nov, 2015 2 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 27 Nov, 2015 3 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
- 26 Nov, 2015 2 commits
-
-
Dave Hylands authored
With these you can now do things like: stm.mem32[0x20000000] = 0x80000000 and read 32-bit values. You can also read all the way to the end of memory using either stm.mem32[0xfffffffc] or stm.mem32[-4]. IRQs shouldn't use mem32 at all since they'd fail if the top 2 bits weren't equal, so IRQs should be using 16-bit I/O.
-
Paul Sokolovsky authored
-