Commit Graph

12 Commits

Author SHA1 Message Date
Damien George
c12b2213c1 Change mp_method_t.name from const char * to qstr.
Addresses issue #377.
2014-03-26 20:15:40 +00:00
Damien George
c3d35c6ac7 stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
Damien George
360b25ab0f stm: Add udelay (delay in microseconds). 2014-03-08 15:17:10 +00:00
Dave Hylands
ee31f71d39 Add EXTI support
Revamp usrsw to use new exti code.
Add user switch callback function.
2014-02-23 11:26:22 -08:00
Dave Hylands
51dabac096 Add pin mapping code.
This commit also introduces board directories and moves board
specific config into the appropriate board directory.

boards/stm32f4xx-af.csv was extracted from the STM32F4xx datasheet
and hand-tweaked.

make-pins.py takes boards/stm32f4xx-af.csv, boards/stm32f4xx-prefix.c,
and boards/BOARD-NAME/pins.csv as input and generates the file
build/pins_BOARD_NAME.c

The generated pin file for PYBOARD4 looks like this:
https://gist.github.com/dhylands/9063231

The generated pins file includes all of the supported alternate
functions, and includes upsupported alternate functions as comments.

See the commnet block at the top of stm/pin_map.c for details on
how to use the pin mapper.

I also went ahead and modified stm/gpio.c to use the pin mapper.
2014-02-17 21:20:38 -08:00
Damien George
517e1706bd Merge pull request #309 from pfalcon/stm-sys-path
stm: Initialize sys.path with ["0:/", "0:/src", "0:/lib"].
2014-02-17 22:21:25 +00:00
Paul Sokolovsky
4aee119f94 stm: Initialize sys.path with ["0:/", "0:/src", "0:/lib"].
This is compatible with what search path was before sys.path refactor,
with addition of module library path ("0:/lib").
2014-02-18 00:06:37 +02:00
Damien George
402dc31aa7 stm: Factor out GPIO code to its own file. Add functions to set GPIO mode.
GPIO functions are crude, and need to be replaced with better ones!
2014-02-16 23:44:23 +00:00
Damien George
2abbae3419 stm: Rename mma -> accel. 2014-02-16 21:41:57 +00:00
Damien George
a71c83a1d1 Change mp_obj_type_t.name from const char * to qstr.
Ultimately all static strings should be qstr.  This entry in the type
structure is only used for printing error messages (to tell the type of
the bad argument), and printing objects that don't supply a .print method.
2014-02-15 11:34:50 +00:00
Damien George
2c30256382 stm: Clean up main.c; disable libgcc by default.
f2d and d2f functions from libgcc does not work correctly, most likely
due to the ABI being incorrect.  libgcc disabled for now.
2014-01-21 23:28:03 +00:00
Damien George
55baff4c9b Revamp qstrs: they now include length and hash.
Can now have null bytes in strings.  Can define ROM qstrs per port using
qstrdefsport.h
2014-01-21 21:40:13 +00:00