aboutsummaryrefslogtreecommitdiff
path: root/stmhal
AgeCommit message (Collapse)Author
2014-04-17stmhal: Change VID to 0xf055=FOSS, and PID to a random number.Damien George
Needs a better solution.
2014-04-17stmhal: Add more math functions.Damien George
Taken straight from musl and newlib. License seems compatible with MIT.
2014-04-17stmhal: Fix 64-byte USB packet bug properly.Damien George
A 64-byte packet is now followed by a 0-byte packet if there is nothing more to send. This flushes the USB endpoint.
2014-04-16stmhal: Replace magic number 3 with CDC_IN_EP define.Damien George
2014-04-16stmhal: Improve flash storage cache management.Damien George
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-16stmhal: Add pyb.have_cdc function to check if USB CDC device is enabled.Damien George
2014-04-16stmhal: Fix USB CDC buffer overrun error.Damien George
Need to wait for the low-level USB driver to send the data over the USB in-endpoint before the buffer can be used again. This patch adds a check for this.
2014-04-16Merge pull request #498 from lurch/create-headers-from-filesDamien George
Auto-generate the stmhal/pybcdc_inf header file from static files
2014-04-16stmhal: Fix C bindings of I2C.read/write.Damien George
2014-04-16Auto-generate the stmhal/pybcdc_inf header file from static filesAndrew Scheller
The USB VID&PID are automatically extracted from usbd_desc_cdc_msc.c and inserted into pybcdc_inf.template, ensuring that the same USB IDs get used everywhere
2014-04-16stmhal: Add I2C functions for pure master read/write.Damien George
2014-04-15Merge pull request #496 from dhylands/fix-debug-usartDamien George
Fix call to enable pyb_usart_global_debug.
2014-04-15Fix call to enable pyb_usart_global_debug.Dave Hylands
2014-04-15stmhal: Fix USB MSC so that it unmounts correctly on Mac OS X.Damien George
Mac OS X sends a SCSI command to remove the medium when it unmounts a drive. If this command is not honoured, then OS X will automatically remount the drive, making it impossible to eject. This patch disables the USB MSC when the right SCSI command is sent.
2014-04-15stmhal: Add ADC function to read data at a given frequency.Damien George
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-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.