Apparently the order of interface numbers should be sequential and
increasing in a config descriptor. So as to retain compatibility with
Windows drivers for the CDC+MSC and CDC+HID modes, we move the CDC
configs to the end of the descriptors, instead of changing the interface
numbers.
See PR #957 for background.
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.
This file was accidentally skipped when the cc3200 port was added to the
tree since binary files are by default igonerd by git. This is a small
precompiled piece of software provided by TI that simply relocates the
boot manager to the beginning of the RAM space after it has been written
by the ROM bootloader.
Previous to this patch, a big-int, float or imag constant was interned
(made into a qstr) and then parsed at runtime to create an object each
time it was needed. This is wasteful in RAM and not efficient. Now,
these constants are parsed straight away in the parser and turned into
objects. This allows constants with large numbers of digits (so
addresses issue #1103) and takes us a step closer to #722.
To enable parsing constants more efficiently, mp_parse should be allowed
to raise an exception, and mp_compile can already raise a MemoryError.
So these functions need to be protected by an nlr push/pop block.
This patch adds that feature in all places. This allows to simplify how
mp_parse and mp_compile are called: they now raise an exception if they
have an error and so explicit checking is not needed anymore.
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.
There was a stray factor of 2 (VBAT_DIV) that looks like it was copied incorrectly from the read_core_vbat() function.
The factor exists in read_core_vbat() because VBAT is measured through a 2:1 voltage divider.
read_core_vref now returns values around 1.21V (assuming that external reference voltage is 3.3V) which is in line with the datasheet values.
See comment at http://forum.micropython.org/viewtopic.php?f=6&t=533&p=2991#p2991