- 02 Aug, 2015 1 commit
-
-
Damien George authored
Extracted GPIO clock enable logic into mp_hal_gpio_clock_enable and called from anyplace which might need to use GPIO functions on ports other than A-D. Thanks to Dave Hylands for the patch.
-
- 29 Jul, 2015 1 commit
-
-
Dave Hylands authored
-
- 24 Jun, 2015 1 commit
-
-
blmorris authored
This removes hard-coded DMA init params from dma_init(), instead defining these parameters in a DMA_InitTypeDef struct that gets passed as an argument to dma_init() This makes dma_init more generic so it can be used for I2S and SD Card, which require different initialization parameters.
-
- 10 Jun, 2015 1 commit
-
-
Damien George authored
This is so that the DMA can be shared by multiple peripherals.
-
- 03 Jun, 2015 1 commit
-
-
Damien George authored
Addresses issue #1268.
-
- 28 May, 2015 1 commit
-
-
Damien George authored
-
- 27 May, 2015 1 commit
-
-
Damien George authored
-
- 16 Apr, 2015 1 commit
-
-
Damien George authored
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.
-
- 21 Jan, 2015 2 commits
-
-
Damien George authored
With this patch str/bytes construction is streamlined. Always use a vstr to build a str/bytes object. If the size is known beforehand then use vstr_init_len to allocate only required memory. Otherwise use vstr_init and the vstr will grow as needed. Then use mp_obj_new_str_from_vstr to create a str/bytes object using the vstr memory. Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes on unix x64.
-
Dave Hylands authored
-
- 01 Jan, 2015 1 commit
-
-
Damien George authored
-
- 08 Dec, 2014 1 commit
-
-
Damien George authored
-
- 06 Dec, 2014 1 commit
-
-
Damien George authored
Uses DMA if interrupts are enabled, polling if they are disabled.
-
- 26 Oct, 2014 1 commit
-
-
Damien George authored
Was 1 or 2, now 0 or 1 (respectively). 0 means sample MISO on first edge, 1 means sample on second edge. Addresses issue #936.
-
- 23 Oct, 2014 1 commit
-
-
Damien George authored
Addresses issue #921.
-
- 30 Sep, 2014 1 commit
-
-
Damien George authored
Most of the time you don't use the NSS pin of the SPI bus, and so it shouldn't be enabled by default (this gave some bugs in the past).
-
- 25 Sep, 2014 1 commit
-
-
Damien George authored
Pulled in and modified work done by mux/iabdalkader on cc3k driver, from iabdalkader-cc3k-update branch. That branch was terribly messy and had too many conflicts to merge neatly.
-
- 29 Aug, 2014 1 commit
-
-
Damien George authored
Addressing issue #50, still some way to go yet.
-
- 03 Jul, 2014 1 commit
-
-
Damien George authored
See discussion in issue #50.
-
- 19 Jun, 2014 1 commit
-
-
Emmanuel Blot authored
-
- 04 May, 2014 1 commit
-
-
Damien George authored
-
- 03 May, 2014 2 commits
-
-
Damien George authored
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
-
Damien George authored
-
- 02 May, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 29 Apr, 2014 1 commit
-
-
Damien George authored
Decided to write own script to pull documentation from comments in C code. Style for writing auto generated documentation is: start line with /// and then use standard markdown to write the comment. Keywords recognised by the scraper begin with backslash. See code for examples. Running: python gendoc.py modpyb.c accel.c adc.c dac.c extint.c i2c.c led.c pin.c rng.c servo.c spi.c uart.c usrsw.c, will generate a HTML structure in gendoc-out/. gendoc.py is crude but functional. Needed something quick, and this was it.
-
- 26 Apr, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
-
- 21 Apr, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
The three classes I2C, SPI and USART now have a fairly uniform (Python) API. All are constructed, initialised and deinitialised in the same way. They can have most of their parameters set, using keyword arguments. All have send and recv (although slightly different with I2C requiring an address in master mode). recv can do inplace receiving (ie store the data in a previously-created bytearray). It's just polling mode at the moment, but interrupt and DMA would be nice to add.
-
- 20 Apr, 2014 4 commits
-
-
Damien George authored
-
Damien George authored
The HAL handles for the I2C/SPI objects are rather large, so we don't want to unnecessarily include them.
-
Dave Hylands authored
-
Damien George authored
-
- 19 Apr, 2014 3 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Also some updates to compile with latest changes to core py.
-