Merge branch 'master' of github.com:micropython/micropython
stmhal: Add example use to RTC doc; add rtc.c to gendoc.py.
CPython compatibility: raise an error for operations on a closed file descriptor

In CPython any operations on a file that has been closed already reaises
a ValueError with message "I/O operation on closed file"
Merge pull request #543 from lurch/patch-4

Make pyboard.enter_raw_repl more robust
stmhal: Remove #include <stdint.h> from mpconfigport.h.

Make include dependencies neater, and adheres to the coding convention
that headers should not include headers.
Merge pull request #546 from stinos/relax-makeqstrdata

More relaxed parsing of preprocessed qstr header
stmhal: Fix bug where negative delay/udelay lead to huge delays.

A negative ms/us is now treated as a delay of 0 ms/us.  This patch also
improves the calibration of udelay.
Merge pull request #551 from stinos/closed-fd-err

CPython compatibility: raise an error for operations on a closed file de...
mingw: Add implementation of realpath()

The mingw port used _fullpath() until now, but the behaviour is not exactly
the same as realpath()'s on unix; major difference being that it doesn't
return an error for non-existing files, which would bypass main's error
checking and bail out without any error message.

Also realpath() will return forward slashes only since main() relies on that.
stmhal: Fix typos in class documentation.
tests: Add a suite of tests specifically for the pyboard.

In tests/pyb is now a suite of tests that tests the pyb module on the
pyboard.  They include expected output files because we can't run
CPython on the pyboard to compare against.

run-tests script has now been updated to allow pyboard tests to be run.
Just pass the option --pyboard.  This runs all basic, float and pyb
tests.  Note that float/math-fun.py currently fails because not all math
functions are implemented in stmhal/.
unix, file.c: adhere to coding conventions.
py, objtype.c: Rename class_ to instance_ following change of typedef.

This follows up 0a7e01ae3c529fddf79dc5c71bf7e43cff3f9fa0.
stmhal: Wrap CC3000 driver in MICROPY_HW_ENABLE_CC3K.

This renames MICROPY_HW_HAS_WLAN to MICROPY_HW_ENABLE_CC3K (since it's a
driver, not a board feature) and wraps all CC3000 code in this #if.
It's disabled for all boards.
RTC doc fix
stmhal: Default build directory now includes board name.

BUILD is build-$(BOARD) by default.
stmhal: Change names: flash to firmware, flashboard to deploy.

Since firmware lives in a build directory which already specifies the
board name, no real reason to also have the firmware have the board
name.
Updated doc fix
tools: pyboard.py now acts as a command-line program to run scripts.

You can run a local script on the pyboard using:

    python pyboard.py test.py

where test.py is the local script you want to run.
stmhal: Add .gitignore to ignore the new build dir names.