Remove reference to pyb.gc; add reference to pyb.millis.
There are lots of functions not listed when you run help(), but it would
be too much to list them all, so we list only some basic, useful ones.
Addresses issue #846.
As per issue #876, the network module is used to configure NICs
(hardware modules) and configure routing. The usocket module is
supposed to implement the normal Python socket module and selects the
underlying NIC using routing logic.
Right now the routing logic is brain dead: first-initialised,
first-used. And the routing table is just a list of registered NICs.
cc3k and wiznet5k work, but not at the same time due to C name clashes
(to be fixed).
Note that the usocket module has alias socket, so that one can import
socket and it works as normal. But you can also override socket with
your own module, using usocket at the backend.
In CPython IOError (and EnvironmentError) is deprecated and aliased to
OSError. All modules that used to raise IOError now raise OSError (or a
derived exception).
In Micro Python we never used IOError (except 1 place, incorrectly) and
so don't need to keep it.
See http://legacy.python.org/dev/peps/pep-3151/ for background.
Viper can now do the following:
def store(p:ptr8, c:int):
p[0] = c
This does a store of c to the memory pointed to by p using a machine
instructions inline in the code.
Teensy doesn't need to worry about overflows since all of
its timers are only 16-bit.
For PWM, the pulse width needs to be able to vary from 0..period+1
(pulse-width == period+1 corresponds to 100% PWM)
I couldn't test the 0xffffffff cases since we can't currently get a
period that big in python. With a prescaler of 0, that corresponds
to a freq of 0.039 (i.e. cycle every 25.56 seconds), and we can't
set that using freq or period.
I also tested both stmhal and teensy with floats disabled, which
required a few other code changes to compile.
Pulled in and modified work done by mux/iabdalkader on cc3k driver, from
iabdalkader-cc3k-update branch. That branch was terribly messy and had
too many conflicts to merge neatly.