Commit Graph

38 Commits

Author SHA1 Message Date
Daniel Campora
eb9a3ec654 cc3200: Disable uheapq and uhashlib.
Those two are rarely used features and better to have the extra heap.
2015-09-27 18:04:11 +02:00
Daniel Campora
c92e6a45eb cc3200: Rename pyb module to machine. 2015-09-27 16:50:27 +02:00
Daniel Campora
ef369249cb cc3200: Implement support for os.dupterm(). 2015-09-27 11:27:24 +02:00
Daniel Campora
57fa14b5be cc3200: New WLAN API including test. 2015-09-27 01:50:52 +02:00
Daniel Campora
dbdcb58d64 cc3200: New irq API, affects all classes that provide the irq method. 2015-09-27 01:48:20 +02:00
Daniel Campora
dffa9f6da6 cc3200: New SD and RTC API plus os and time modules' extensions. 2015-09-21 22:30:32 +02:00
Daniel Campora
7c87747db0 cc3200: Disable some uPy features in debug mode to help code fit. 2015-09-10 08:00:47 +02:00
Daniel Campora
f91f212d9f cc3200: New UART API plus related test. 2015-09-10 07:59:47 +02:00
Daniel Campora
fb3f9cff33 cc3200: Switch to 1 byte hash for QSTRs. 2015-07-30 00:43:13 +02:00
Daniel Campora
fa47bebfbc cc3200: Add struct weak link for ustruct. 2015-07-10 11:37:46 +02:00
Daniel Campora
9a65fa304c cc3200: Add modussl, ssl sockets subclassed from normal sockets.
Stream methods were added to normal sockets as in the unix port.
2015-07-02 16:30:00 +02:00
Daniel Campora
f522849a4d cc3200: Add socket.timeout and socket.error exceptions. 2015-07-02 11:53:15 +02:00
Daniel Campora
778413168b cc3200: Enable more features to improve compatibility with stmhal. 2015-06-28 14:14:20 +02:00
Daniel Campora
ed56b0baba cc3200: Finally unlock the full wake on WLAN feature set. 2015-05-22 19:53:33 +02:00
Daniel Campora
18030bd85d cc3200: Add own ubinascii module.
The reason to have our owm ubinascii module is so that later we
can add crc32 support using the hardware engine.
2015-05-22 09:56:11 +02:00
Daniel Campora
e800db562f cc3200: Add uhashlib. Supports SHA1 and SHA256. 2015-05-20 11:44:24 +02:00
Daniel Campora
514ba15d6a cc3200: Disable UCTYPES and enable ARRAY_SLICE_ASSIGN. 2015-05-20 11:44:19 +02:00
Daniel Campora
cd3f2523f1 cc3200: Disable WLAN.urn() by default.
Can be enabled by defining MICROPY_PORT_WLAN_URN=1 in mpconfigport.h.
2015-05-17 14:20:24 +02:00
Daniel Campora
8e611e8414 cc3200: Add Timer module. Supports free running, PWM and capture modes. 2015-05-17 12:34:49 +02:00
Daniel Campora
2bdefea9d6 cc3200: Enable MICROPY_MODULE_WEAK_LINKS. 2015-05-07 12:19:31 +02:00
Daniel Campora
e04aa96b4d cc3200: Define MICROPY_CPYTHON_COMPAT=0.
This only disables some corner case functionality to keep C Python
compatibility, and saves ~600 bytes.
2015-05-05 11:23:06 +02:00
Daniel Campora
8c8d7f3c60 cc3200: Clean up pyb.Pin
Remove unused and unneeded functions, also create Pin.get_config() that
returns the whole configuration of the pin.

This reduces code size by ~500 bytes.
2015-05-03 11:26:56 +02:00
Daniel Campora
f81684141e cc3200: Implement os.uname() to get details of the OS and hardware. 2015-04-29 00:03:56 +02:00
Damien George
7f9d1d6ab9 py: Overhaul and simplify printf/pfenv mechanism.
Previous to this patch the printing mechanism was a bit of a tangled
mess.  This patch attempts to consolidate printing into one interface.

All (non-debug) printing now uses the mp_print* family of functions,
mainly mp_printf.  All these functions take an mp_print_t structure as
their first argument, and this structure defines the printing backend
through the "print_strn" function of said structure.

Printing from the uPy core can reach the platform-defined print code via
two paths: either through mp_sys_stdout_obj (defined pert port) in
conjunction with mp_stream_write; or through the mp_plat_print structure
which uses the MP_PLAT_PRINT_STRN macro to define how string are printed
on the platform.  The former is only used when MICROPY_PY_IO is defined.

With this new scheme printing is generally more efficient (less layers
to go through, less arguments to pass), and, given an mp_print_t*
structure, one can call mp_print_str for efficiency instead of
mp_printf("%s", ...).  Code size is also reduced by around 200 bytes on
Thumb2 archs.
2015-04-16 14:30:16 +00:00
Daniel Campora
99f7184073 cc3200: Disable MICROPY_COMP_TRIPLE_TUPLE_ASSIGN.
Because it's only a compiler optimization and increases code size.
2015-04-13 00:03:41 +02:00
Daniel Campora
d278e49475 cc3200: Enable TRIPLE_TUPLE_ASSIGN and UBINASCII. 2015-04-11 13:35:07 +02:00
Daniel Campora
6e25d955f4 cc3200: Enable long filename support in FatFS.
This has implications all over the place. I have to admit that
you can instantly see that usability improves, but it costs 3K.
At the same time I took the oportunity to rename the '/SFLASH'
drive to '/flash' which improves compatibility with the pyboard.
2015-04-11 13:35:05 +02:00
danicampora
6de1b39368 cc3200: Make peripheral objects static.
This prevents duplication of objects in the sleep list. Also helps
with reducing the code size by ~100 bytes.
2015-03-17 13:26:07 +01:00
danicampora
9e44383e3f cc3200: Add power management framework. Add mpcallback class.
Supports suspend and hibernate modes. Waking is possible throug GPIO
and WLAN.
The mpcallback class is generic and can be reused by other classes.
2015-03-11 17:00:33 +01:00
danicampora
73aee8da54 cc3200: Merge ExtInt class into Pin class.
Also add another method to change the pin's interrupt mode
on the fly.
2015-03-11 17:00:28 +01:00
danicampora
d226dd2f59 cc3200: Add preliminary low power deep sleep support. 2015-03-11 16:54:09 +01:00
danicampora
70b3160871 cc3200: Introduce MICROPY_PORT_HAS_TELNET and MICROPY_PORT_HAS_FTP.
These definitions help on making modwlan.c usable by other ports
with the CC3100.
2015-02-23 15:02:57 +01:00
danicampora
a6862fc812 cc3200: Disable MICROPY_OPT_COMPUTED_GOTO.
Saves around 1.3K. At the same time re-enable MICROPY_PY_SYS_EXIT
since it doesn't take much space and might be useful for certain
scripts.
2015-02-21 14:19:32 +01:00
danicampora
82fabf4e52 cc3200: Disable MICROPY_PY_SYS_EXIT and MICROPY_EMIT_INLINE_THUMB.
Disabling MICROPY_EMIT_INLINE_THUMB gives us back around 6K of
precious RAM.
2015-02-20 17:12:39 +01:00
danicampora
6b21c3fdd6 cc3200: Refactor UART and I2C object creation.
I2C objects can be freed by the GC and a __del__ method is provided
in order to de-init the peripheral prior to being garbage collected.
UART objects are now added to a local list and this list is now part
of the VM_STATE.
2015-02-20 16:41:55 +01:00
danicampora
99f3f6b5de cc3200: Add I2C module. Only master mode is currently supported. 2015-02-13 17:54:04 +01:00
danicampora
53716fcc3e cc3200: Rename GPIO module to Pin.
This change helps making the cc3200 port API a bit closer to stmhal.
The ramaining differences are due to the specific hardware details
of each chip. One feature that has been deliberately disabled is the
possibility to add custom names and custom pin mappings. Those
features are nice and convenient, but in this port, code size is a
major concern.
2015-02-09 20:01:54 +01:00
danicampora
8785645a95 cc3200: Add cc3200 port of MicroPython.
The port currently implements support for GPIO, RTC, ExtInt and the WiFi
subsystem. A small file system is available in the serial flash. A
bootloader which makes OTA updates possible, is also part of this initial
implementation.
2015-02-06 22:10:11 +00:00