aboutsummaryrefslogtreecommitdiff
path: root/stmhal
AgeCommit message (Collapse)Author
2014-09-15stmhal/hal/src/stm32f4xx_hal_sd.c: fix SDHC card capacityFelix Domke
2014-09-15py: Move definition of mp_sys_exit to core.Damien George
sys.exit always raises SystemExit so doesn't need a special implementation for each port. If C exit() is really needed, use the standard os._exit function. Also initialise mp_sys_path and mp_sys_argv in teensy port.
2014-09-13py: Implement divmod, % and proper // for floating point.Damien George
Tested and working on unix and pyboard.
2014-09-13stmhal: Slightly improved memcpy; memset uses word store when aligned.Damien George
2014-09-12Merge branch 'memcpy' of github.com:iabdalkader/micropython into ↵Damien George
iabdalkader-memcpy
2014-09-11Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-09-11py and libm: Add asinf,acosf; print higher precision for float.Damien George
Also use less stack space when printing single precision float. Addition of asinf and acosf addresses issue #851.
2014-09-11Optimize memcpy moreiabdalkader
2014-09-11Add LIS3DSH accelometer support to staccel.pyHirotaka Kawata
2014-09-11Memcpy: copy wordsiabdalkader
2014-09-07stmhal: uart ioctl uses EINVAL, and checks TXE bit for write-ability.Damien George
2014-09-07Remove skeletal modselect from extmod and just put it in stmhal.Damien George
2014-09-07stmhal: Fix modselect so non-hashable objects can be polled.Damien George
2014-09-07stmhal: Add polling ability to UART object.Damien George
2014-09-07stmhal: Implement generic select.select and select.poll.Damien George
2014-09-01stmhal, modwiznet5k: Add very minimal documentation.Damien George
2014-09-01stmhal: Add wiznet5k module, to control WIZnet ethernet adaptor.Damien George
Allows to create socket objects that support TCP and UDP in server and client mode. Interface is very close to standard Python socket class, except bind and accept do not work the same (due to hardware not supporting them in the usual way). Not compiled by default. To compile this module, use: make MICROPY_PY_WIZNET5K=1
2014-08-30Change some parts of the core API to use mp_uint_t instead of uint/int.Damien George
Addressing issue #50, still some way to go yet.
2014-08-29lib: Add lib and libm, moving current files from stmhal.Damien George
Top-level lib directory is for standard C libraries that we want to provide our own versions of (for efficiency and stand-alone reasons). It currently has libm in it for math functions. Also add atanf and atan2f, which addresses issue #837.
2014-08-26Merge pull request #824 from dhylands/sdcard-powerDamien George
Fix sdcard_power_on to not do anything if the card is already powered on...
2014-08-26stmhal, STM32F4DISC: Small changes to ST accel driver.Damien George
2014-08-26stmhal, staccel.py: Style cleanup.Damien George
2014-08-26Added LIS302DL ID checkDavid Siorpaes
2014-08-26stmhal: Hookup USB_VCP.any().Damien George
Thanks to Dave Hylands for this patch.
2014-08-26stmhal: Fix build issues with (old) CC3000 driver.Damien George
Addresses issue #825.
2014-08-25Fix sdcard_power_on to not do anything if the card is already powered on.Dave Hylands
2014-08-25stmhal: Improve efficiency of SysTick IRQ and HAL_Delay.Damien George
SysTick IRQ now increases millisecond counter directly (ie without calling HAL_IncTick). Provide our own version of HAL_Delay that does a wfi while waiting. This more than halves power consumption when running a loop containing a pyb.delay call. It used to be like this, but new version of HAL library regressed this feature.
2014-08-25stmhal: Use MP_OBJ_NEW_SMALL_INT directly in pyb.micros/millis.Damien George
Also some whitespace cleanup.
2014-08-25Add support for pyb.micros() by using the systick timer.Dave Hylands
I also removed trailing spaces from modpyb.c which affected a couple of lines technically not part of this patch. Tested using: https://github.com/dhylands/upy-examples/blob/master/micros_test.py which eventually fails due to wraparound issues (I could fix the test to compensate but didn't bother)
2014-08-25stmhal: Make enable_irq and disable_irq inline functions.Damien George
These functions are generally 1 machine instruction, and are used in critical code, so makes sense to have them inline. Also leave these functions uninverted (ie 0 means enable, 1 means disable) and provide macro constants if you really need to distinguish the states. This makes for smaller code as well (combined with inlining). Applied to teensy port as well.
2014-08-25Add save/restore_irqDave Hylands
Factored irq functions into a separate file.
2014-08-24stmhal, pin: Update documentation.Damien George
2014-08-24Added python script to map AF to a pin nameDave Hylands
Added some functions to Pin class to query mode, pull, and af
2014-08-24stmhal, modtime: Small changes, reduced code size by around 80 bytes.Damien George
Also added test for modtime.
2014-08-24Add time.mktime and enhance time.localtime (for stmhal)Dave Hylands
Now you can use time.localtime on the timestamps presented by os.stat
2014-08-24py: Fix bug where GC collected native/viper/asm function data.Damien George
Because (for Thumb) a function pointer has the LSB set, pointers to dynamic functions in RAM (eg native, viper or asm functions) were not being traced by the GC. This patch is a comprehensive fix for this. Addresses issue #820.
2014-08-16Put some code into the first 16K of flashDave Hylands
This basically shrinks the remaining size of flash in the portion that goes after the internal flash drive.
2014-08-16stmhal: In safe mode, still mount SD card and present as MSD over USB.Damien George
It's still "safe" because no scripts are run. Remove the SD card if you want to access the internal flash filesystem. Addresses issue #616. Also: remove obsolete pyb.source_dir setting, and reset pyb.main and pyb.usb_mode settings on soft-reset.
2014-08-16stmhal: Fix printing of pin name in error message.Damien George
2014-08-16stmhal: For non-debug compile, enable CC/LD opt to remove dead code.Damien George
Saves over 35k ROM due to elimination of unused HAL functions. All tests pass. Addresses issue #702.
2014-08-14stmhal: Resolve question in comment about timer clock.Damien George
2014-08-12extmod: Finish rename of zlib to zlibd; enable zlibd on stmhal.Damien George
2014-08-12stmhal: Enable moductypes by default.Damien George
Also fixes compiler error in moductypes when compiled without debugging. Addresses issue #778.
2014-08-10stmhal: Working STM32F4DISC accelerometer, via Python script.Damien George
Thanks to David Siorpaes.
2014-08-10doc: Document gc, sys, math, cmath.Damien George
2014-08-10stmhal: Add sys.platform string to PYBv1.0 (it's "pyboard").Damien George
2014-08-09stmhal, pin: Save 140 bytes ROM by simplifying pin_print function.Damien George
2014-08-09stmhal, pin: Simplify default value for alternate function init.Damien George
2014-08-08stmhal: Start of documentation for modos and modtime.Damien George
2014-08-08stmhal/teensy: Use _ instead of - in source file names.Damien George
Trying to move towards consistency, let's use _ exclusively in names of source files (eg .c, .h, .csv).