aboutsummaryrefslogtreecommitdiff
path: root/stmhal
AgeCommit message (Collapse)Author
2014-04-15stmhal: Add I2C.scan method, to scan all devices on the bus.Damien George
Simple way to find the address of an attached I2C device.
2014-04-15stmhal: Add simple README.txt to freshly-created filesystem.Damien George
2014-04-15stmhal: Wrap skin-named-usarts in PYBV10 #if.Damien George
2014-04-14stmhal: Work around crazy bug in USB CDC.Damien George
Packets of 64 bytes length are not send to the host until the following packet is sent. Fixed by never sending packets of 64 bytes length.
2014-04-14stmhal: Improved usart module a bit.Damien George
2014-04-14stmhal: Add pyb.wfi() function (calls __WFI).Damien George
2014-04-13stmhal: Add stdin/stdout/stderr objects.Damien George
Available via sys.std{in,out,err}. Basic reading and writing supported. Even sys.stdin.readline!
2014-04-13stmhal: Improve USB CDC write function (increase timeout).Damien George
2014-04-13py: Fix up source-line calculation.Damien George
Should address issue #475.
2014-04-13stm[hal]: Init mp_sys_path and mp_sys_argv correctly.Damien George
2014-04-13Merge pull request #476 from pfalcon/static-sysDamien George
Convert sys module to static allocation
2014-04-13py: Fix mp_get_buffer, and use it in more places.Damien George
Must use mp_obj_get_type to get the type of an object. Can't assume mp_obj_t is castable to mp_obj_base_t.
2014-04-13stmhal: Little hack to dump GC allocation table using pyb.info().Damien George
Pass a single parameter (doesn't matter what): pyb.info(1), will dump the GC alloc table.
2014-04-13stmhal: Update for static mod sys.Paul Sokolovsky
2014-04-12stmhal: Put a USB structure in ROM; GC doesn't scan the data segment.Damien George
2014-04-12stmhal: Move fatfs volume/partition lookup table to ROM.Damien George
2014-04-12stmhal: Move I2C objects to ROM.Damien George
2014-04-10Merge pull request #458 from lurch/patch-1Damien George
Tweak pybcdc.inf to match recent changes to pybcdc.h
2014-04-10stmhal: Add stm module, which contains some constants for the MCU.Damien George
Also contains raw memory read/write functions, read8, read16, read32, write8, write16, write32. Can now do: stm.write16(stm.GPIOA + stm.GPIO_BSRRL, 1 << 13) This turns on the red LED. With the new constant folding, the above constants for the GPIO address are actually compiled to constants (and the addition done) at compile time. For viper code and inline assembler, this optimisation will make a big difference. In the inline assembler, using these constants would not be possible without this constant folding.
2014-04-10Tweak pybcdc.inf to match recent changes to pybcdc.hAndrew Scheller
2014-04-09stmhal: Make /src/main.py just /main.py; allow SD to be used as root device.Damien George
2014-04-09stmhal: Update windows driver; \r\n newlines and addition USB id.Damien George
2014-04-09stmhal: Add windows cdc .inf driver to flash filesystem.Damien George
2014-04-09stmhal: Improve help() function.Damien George
2014-04-09stmhal: Add functionality to Servo object.Damien George
Can now calibrate, set pulse width, angle and speed.
2014-04-08Fix make-pins.py to support having multiple names for a pin.Dave Hylands
SW and X17 now both map to PB3
2014-04-08stmhal: Make USRSW re-register the EXTI callback each time it's set.Damien George
2014-04-08stmhal: in EXTI interrupt handler wrap uPy calls in gc_lock and nlr_buf.Damien George
2014-04-08Add a check for NULL nlr_top in nlr_jump.Damien George
If no nlr_buf has been pushed, and an nlr_jump is called, then control is transferred to nlr_jump_fail (which should bail out with a fatal error).
2014-04-08Improve REPL detecting when input needs to continue.Damien George
Full CPython compatibility with this requires actually parsing the input so far collected, and if it fails parsing due to lack of tokens, then continue collecting input. It's not worth doing it this way. Not having compatibility at this level does not hurt the goals of Micro Python.
2014-04-08unix, stmhal: Consistently use "FileIO" as class name for file objects.Paul Sokolovsky
They correspond to io.FileIO in io module hierarchy (with small caveat that io.FileIO is raw file and works with bytes, not strings).
2014-04-07Replace some Makefile commands with variables in py/mkenv.mkAndrew Scheller
2014-04-06py: Add option to compiler to specify default code emitter.Damien George
Also add command line option to unix port to select emitter.
2014-04-05py: Replace stream_p with *stream_p in mp_obj_type_t.Damien George
This is to reduce ROM usage. stream_p is used in file and socket types only (at the moment), so seems a good idea to make the protocol functions a pointer instead of the actual structure. It saves 308 bytes of ROM in the stmhal/ port, 928 in unix/.
2014-04-05py: Make globals and locals proper dictionary objects.Damien George
Finishes addressing issue #424. In the end this was a very neat refactor that now makes things a lot more consistent across the py code base. It allowed some simplifications in certain places, now that everything is a dict object. Also converted builtins tables to dictionaries. This will be useful when we need to turn builtins into a proper module.
2014-04-05py: Change module globals from mp_map_t* to mp_obj_dict_t*.Damien George
Towards addressing issue #424. Had a small increase to ROM usage (order 60 bytes).
2014-04-05Improve GC finalisation code; add option to disable it.Damien George
2014-04-05py: Change nlr_jump to nlr_raise, to aid in debugging.Damien George
This does not affect code size or performance when debugging turned off. To address issue #420.
2014-04-05stmhal: autoflash now enters serial comms after flashing.Damien George
2014-04-05stmhal: Add more escape seqs; add debugging output for escape seq.Damien George
2014-04-05stmhal readline: Parse XTERM Home/End key codes.Paul Sokolovsky
Which are ESC O H, ESC O F.
2014-04-03Add the git version to the bannerDave Hylands
2014-04-03stmhal: Add home/end cursor support in readline.Damien George
Home/end work in picocom and screen (different codes in those 2 programs). Also, CTRL-A (for non-empty liny) and CTRL-E act as home/end.
2014-04-03Merge pull request #419 from pfalcon/stmhal-file-streamsDamien George
stmhal: Reimplement file support using stream protocol API.
2014-04-03stmhal: On soft reset, if in raw REPL mode, don't run main.py.Damien George
2014-04-03stmhal: Fix raw REPL so that it passes through more ASCII chars.Damien George
2014-04-03stmhal: Add powf, logf, log2f, log10f.Damien George
2014-04-03stmhal: #undef log2f if it's defined.Damien George
2014-04-03stmhal: Reimplement file support using stream protocol API.Paul Sokolovsky
This adds readline(), readall(), etc. methods. Also other fixes to make Python API compliant and "with" support.
2014-04-02stmhal: Fix servo object; add fpclassify to math functions.Damien George