Wykres commitów

15 Commity (8dbbbbc793554f920cf352b0e67da46abe3974cf)

Autor SHA1 Wiadomość Data
Damien George 40f3c02682 Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50.
2014-07-03 13:25:24 +01:00
Damien George e70b5dbe58 stmhal: Some reordering of code/functions. 2014-07-02 14:09:44 +01:00
Dave Hylands 0d81c133b3 Add timer_deinit and call it just before doing a soft-restart
This fixes #733.
2014-06-30 08:07:38 -07:00
Emmanuel Blot f6932d6506 Prefix ARRAY_SIZE with micropython prefix MP_ 2014-06-19 18:54:34 +02:00
Damien George 04b9147e15 Add license header to (almost) all files.
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/.
2014-05-03 23:27:38 +01:00
Damien George 5874c1c92b stmhal: Remove #include <stdint.h> from mpconfigport.h.
Make include dependencies neater, and adheres to the coding convention
that headers should not include headers.
2014-05-03 13:24:21 +01:00
Damien George 3eb8163b16 stmhal: Add documentation for DAC and Timer classes. 2014-05-02 16:58:15 +01:00
Damien George dbc81df5d4 Simplify names for argcheck.c / arg parsing. 2014-04-26 11:19:17 +01:00
Damien George 6d3c5e4301 Add ARRAY_SIZE macro, and use it where possible. 2014-04-26 10:47:29 +01:00
Damien George 6691c9e655 stmhal, timer: Remove obsolete global variable. 2014-04-21 18:19:50 +01:00
Damien George 7fdfa93700 stmhal: Add Timer class: simple TIM control, incl callback on IRQ.
Simple but functional timer control.  More sophistication will
eventually be added, or for now just use direct register access :)

Also added pyb.freq() function to get MCU clock frequencies.
2014-04-21 16:48:16 +01:00
Damien George 6d983539bc stmhal: Improve flash storage cache management.
Internal flash used for the filesystem is now written (from the cache)
only after a 5s delay, or when a file is closed, or when the drive is
unmounted from the host.  This delay means that multiple writes can
accumulate in the cache, and leads to less writes to the flash, making
it last longer.

It's implemented by a high-priority interrupt that takes care of flash
erase and write, and flushing the cache.

This is still only an interim solution for the flash filesystem.  It
eventually needs to be replaced with something that uses less RAM for
the cache, something that can use more of the flash, and something that
does proper wear levelling.
2014-04-16 23:08:36 +01:00
Damien George 4d7f4eb6a9 stmhal: Add ADC function to read data at a given frequency.
Reads ADC values into a bytearray (or similar) at a fixed rate.  Needs a
better name and improved API.  Also fix up DAC dma function (which also
needs a better name and API).
2014-04-15 19:52:56 +01:00
Damien George ea13f407a3 py: Change nlr_jump to nlr_raise, to aid in debugging.
This does not affect code size or performance when debugging turned off.

To address issue #420.
2014-04-05 18:32:08 +01:00
Damien George a12be917a4 stmhal: Add timer module; move servo PWM from TIM2 to TIM5.
As per issue #257, servo is better on TIM5 because TIM2 is connected to
more GPIO.
2014-04-02 15:09:36 +01:00