Damien George
d6c558c0aa
py/parse: Use m_renew_maybe to ensure that memory is shrunk in-place.
The chunks of memory that the parser allocates contain parse nodes and
are pointed to from many places, so these chunks cannot be relocated
by the memory manager. This patch makes it so that when a chunk is
shrunk to fit, it is not relocated.
9 years ago
danicampora
add930c4b5
cc3200: Rename 'server' class to 'Server' for consistency.
9 years ago
danicampora
12547ce737
docs: Minor change to improve clarity in machine.Timer docs.
9 years ago
danicampora
cc7a4d7db2
tests/wipy: Correct machine test expected result.
9 years ago
danicampora
5148860332
tests: Skip uctypes and urandom tests not supported byt the WiPy.
9 years ago
danicampora
495e7cfebc
cc3200: Improve robustness of WLAN during sleep modes.
9 years ago
danicampora
f5248a087a
cc3200: Fix "debug" build.
9 years ago
danicampora
0d210a0be8
docs: Correct WiPy Timer docs.
9 years ago
danicampora
fe9620a2bd
test/wipy: Add Timer class tests.
9 years ago
danicampora
73c9f85b4c
cc3200: Simplify the Timer API and correct the documents.
Make the PWM duty cycle configurable from 0.00 to 100.00 by
accepting values from 0 to 10000.
Add automatic Pin assignment when operating in PWM mode.
9 years ago
danicampora
562bcffd3a
cc3200: Improve robustness of the I2C driver.
When scanning for devices, try reading then writing. Increase the
timeout of the transactions from 10 to 20 ms.
9 years ago
danicampora
ed8db2e371
cc3200: Finally fix the Timer class API.
Properly calculate the period and the prescaler, this now allows to
set the PWM frequency down to 5Hz. Make Timer IDs go from 0 to 3.
Add the trigger definitions for the channel IRQ.
9 years ago
Damien George
53fec1ef48
README.md: Add link to micropython.org.
9 years ago
Damien George
40d8430ee3
py/vm: Add macros to hook into various points in the VM.
These can be used to insert arbitrary checks, polling, etc into the VM.
They are left general because the VM is a highly tuned loop and it should
be up to a given port how that port wants to modify the VM internals.
One common use would be to insert a polling check, but only done after
a certain number of opcodes were executed, so as not to slow down the VM
too much. For example:
#define MICROPY_VM_HOOK_COUNT (30)
#define MICROPY_VM_HOOK_INIT static uint vm_hook_divisor = MICROPY_VM_HOOK_COUNT
#define MICROPY_VM_HOOK_POLL if (--vm_hook_divisor == 0) { \
vm_hook_divisor = MICROPY_VM_HOOK_COUNT;
extern void vm_hook_function(void);
vm_hook_function();
}
#define MICROPY_VM_HOOK_LOOP MICROPY_VM_HOOK_POLL
#define MICROPY_VM_HOOK_RETURN MICROPY_VM_HOOK_POLL
9 years ago
Alex March
69d9e7d27d
py/repl: Check for an identifier char after the keyword.
- As described in the #1850 .
- Add cmdline tests.
9 years ago
Paul Sokolovsky
dfc35afba1
tests/vfs_fat_ramdisk: Skip test if can't allocate ramdisk.
9 years ago
Paul Sokolovsky
6cee869feb
py/qstrdefs.h: qstrs for VfsFat.
9 years ago
Dave Hylands
ec37239e53
stmhal: Improvements to the STM32F4DISC UART config settings.
9 years ago
Dave Hylands
4b2938a4b0
stmhal: Some NETDUINO_PLUS_2 cleanup
- Put the I2C bus on the corect pins
- Add the appropriate board_init to power the shield
9 years ago
Damien George
9598f36a84
py/emitnative: Add check that RHS of viper store is of integral type.
9 years ago
Damien George
94e4bd456f
py/asmx64: Support all 16 regs in reg to memory move instructions.
9 years ago
Damien George
46fc7a3d75
py/asmx64: Add helper macro for generating REX_[WRXB] bits from a reg64.
9 years ago
Paul Sokolovsky
4cd45f48b1
cc3200: Fix breakage after VfsFat refactor.
9 years ago
Paul Sokolovsky
46a0ac02c5
extmod/vfs_fat_ffconf: Reusable FatFs module, move from stmhal/ffconf.
TODO: Probably merge into vfs_fat_diskio.
9 years ago
Paul Sokolovsky
6b0c88256b
extmod/vfs_fat_file: Reusable FatFs module, move from stmhal/file.
9 years ago
Paul Sokolovsky
8cb78e0e53
extmod/vfs_fat_diskio: Reusable FatFs module, move from stmhal/diskio.
9 years ago
Paul Sokolovsky
72085a669b
py/mpstate.h: fs_user_mount is now standard, reusable uPy functionality.
9 years ago
Paul Sokolovsky
9fdac9144d
tests/vfs_fat_ramdisk: Allow to override sector size.
9 years ago
Paul Sokolovsky
9d0525182d
tests/vfs_fat_ramdisk: Switch to ioctl-based blockdev API.
9 years ago
Paul Sokolovsky
9e0478a902
stmhal/diskio: Add provision for default returns for ioctl INIT/SEC_SIZE.
If None was returned for such requests (which likely means that user simply
didn't handle them), it means successful init and default sector size of 512
bytes respectively. This makes only BP_IOCTL_SEC_COUNT a mandatory request,
and thus re-establishes parity with old interface, where only .count() is
mandatory().
9 years ago
Paul Sokolovsky
0ee1d0f407
tests/vfs_fat_ramdisk: Add test for VfsFat.
9 years ago
Paul Sokolovsky
e3c66a5a67
stmhal/file: Paranoid compiler warnings cleanness.
9 years ago
Paul Sokolovsky
baf47c84c4
stmhal/diskio,file: Nanbox cleanness.
9 years ago
Paul Sokolovsky
1bb15ca427
extmod/fsusermount,vfs_fat: Nanbox cleanness.
9 years ago
Paul Sokolovsky
8a43a41b3a
unix: Enable VfsFat support.
9 years ago
Paul Sokolovsky
e9be6a378c
extmod/vfs_fat: Object-oriented encapsulation of FatFs VFS.
This implements OO interface based on existing fsusermount code and with
minimal changes to it, to serve as a proof of concept of OO interface.
Examle of usage:
bdev = RAMFS(48)
uos.VfsFat.mkfs(bdev)
vfs = uos.VfsFat(bdev, "/ramdisk")
f = vfs.open("foo", "w")
f.write("hello!")
f.close()
9 years ago
Paul Sokolovsky
dc3eb55e6a
py/obj.h: If not float support is enabled, define mp_obj_is_float(o) to false.
We have so many configuration options, that finally having shortcuts like
this is helpful and cuts on number of ifdef's.
9 years ago
Paul Sokolovsky
e5cff5b223
tests/bytearray1: Add testcases for "in" operator.
9 years ago
Paul Sokolovsky
c38809e26b
py/objarray: Implement "in" operator for bytearray.
9 years ago
Paul Sokolovsky
609a9c6b71
eagle.rom.addr.v6.ld: More symbols from SDK 1.5.0.
9 years ago
Paul Sokolovsky
bf904b238d
extmod/fsusermount: umount: Add NULL pointer checks.
9 years ago
Paul Sokolovsky
d4315a6caf
float/string_format: Split large test in 2.
9 years ago
Paul Sokolovsky
2850e7cd97
tests/run-tests: Add esp8266 target.
9 years ago
Paul Sokolovsky
dc587a3623
test/float2int: Make test output clearer.
9 years ago
Paul Sokolovsky
a2e39a756c
esp8266/modpybrtc: Simplify multiplication by fixed-point value.
9 years ago
Dave Hylands
32b7e93535
stmhal: NUCLEO 401 - Add definitions for I2C2 and I2C3
9 years ago
Dave Hylands
f791e14750
stmhal: CERB40 - Add pins defines for I2C3
9 years ago
Dave Hylands
38ac23c942
stmhal: NUCLEO 401 - Add a bunch of missing pins and reorder the pins
This groups the pins for a port together and puts them in numerical
order. It also adds ARDUINO pin names.
9 years ago
Dave Hylands
7bb501ef9f
stmhal: Add a function for setting the pin alternate function
mp_hal_gpio_set_af will search for a given function and unit
and set the alternate function to the alternate function index
found.
9 years ago
Damien George
e372e83b30
extmod/fsusermount: Move BP_IOCTL_xxx constants to fsusermount.h.
9 years ago