Paul Sokolovsky
07209f8592
all: Rename mp_obj_type_t::stream_p to protocol.
It's now used for more than just stream protocol (e.g. pin protocol), so
don't use false names.
9 years ago
Damien George
70ff7350e7
stmhal, cc3200: Change i2c.scan() method to scan addresses 0x08-0x77.
A standard I2C address is 7 bits but addresses 0b0000xxx and 0b1111xxx
are reserved. The scan() method is changed to reflect this, along with
the docs.
9 years ago
Paul Sokolovsky
4e51a3038c
cc3200/mods/modwlan: Include stream.h after recent refactor.
9 years ago
danicampora
add930c4b5
cc3200: Rename 'server' class to 'Server' for consistency.
9 years ago
danicampora
495e7cfebc
cc3200: Improve robustness of WLAN during sleep modes.
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
Paul Sokolovsky
4cd45f48b1
cc3200: Fix breakage after VfsFat refactor.
9 years ago
Damien George
5b3f0b7f39
py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.
The first argument to the type.make_new method is naturally a uPy type,
and all uses of this argument cast it directly to a pointer to a type
structure. So it makes sense to just have it a pointer to a type from
the very beginning (and a const pointer at that). This patch makes
such a change, and removes all unnecessary casting to/from mp_obj_t.
9 years ago
Paul Sokolovsky
2eb844e0b4
ports: Rename "machine" module to "umachine".
To let unix port implement "machine" functionality on Python level, and
keep consistent naming in other ports (baremetal ports will use magic
module "symlinking" to still load it on "import machine").
Fixes #1701 .
9 years ago
Noah
00960133c2
docs: Update docs for WiPy wlan.connect().
- The link establishment timeout is infinite by default
- Fix typo in notes about the auth kwarg
9 years ago
danicampora
e4404fbef0
cc3200: Unmount all user file systems after a soft reset.
9 years ago
Damien George
40274fec9c
lib/pyexec: Move header pyexec.h from stmhal directory.
9 years ago
danicampora
8cee03b118
cc3200: Force SSL method to be TLSV1.
The default setting of using the "highest" method available doesn't
work with some servers like Microsoft Azure. TLSV1 seems to work with
pretty much any server.
9 years ago
Damien George
731f359292
all: Add py/mphal.h and use it in all ports.
py/mphal.h contains declarations for generic mp_hal_XXX functions, such
as stdio and delay/ticks, which ports should provide definitions for. A
port will also provide mphalport.h with further HAL declarations.
9 years ago
Paul Sokolovsky
9b12bc788f
cc3200: Switch from HAL_GetTick() to mp_hal_ticks_ms().
9 years ago
Paul Sokolovsky
f4decdc4a3
cc3200: Switch from HAL_Delay() to mp_hal_delay_ms().
9 years ago
danicampora
1950295735
cc3200: Set pin direction first, then value. Fixes #1542 .
9 years ago
danicampora
a654914de4
cc3200: Allow to read pin value when in OPEN_DRAIN mode.
9 years ago
danicampora
a3a33db409
cc3200: Enable WLAN irq on creation.
9 years ago
danicampora
0212dc65b7
cc3200: Add created sockets to the registry.
9 years ago
danicampora
075ca64521
cc3200: Fix UART tests after correcting uart.read() behaviour.
9 years ago
danicampora
1f2daf4304
cc3200: Correct ticks_cpu and ticks_us functions in time module.
9 years ago
danicampora
04db848dc7
docs: Add usocket and ussl modules' documentation.
9 years ago
danicampora
4b630c452d
cc3200: Make socket.listen([backlog]) compliant with Python 3.5.
9 years ago
danicampora
719dca2515
cc3200: Clean-up socket constants.
9 years ago
danicampora
d67ea6b29f
cc3200: Add comment about micropython extensions to standard modules.
9 years ago
danicampora
7ff585333e
cc3200: uart.read() returns EGAIN if no chars available.
9 years ago
danicampora
9c72c71c05
cc3200: WLAN class can retrieve the existing instance.
9 years ago
danicampora
ae70e98ed4
cc3200: Fix time.ticks_* functions.
9 years ago
danicampora
36ae417c9f
docs: Add wipy and network.server documentation.
9 years ago
danicampora
2e0cd20a1d
cc3200: Refactor network module to make the server a propper object.
9 years ago
danicampora
d8137178bb
cc3200: Create wipy module, remove HeartBeat class.
The heartbeat is now controllable via a single function within the
wipy module.
9 years ago
danicampora
4542643025
docs: Update all WiPy docs to reflect the new API.
9 years ago
danicampora
fca3308cc3
cc3200: Improvements to terminal duplication.
9 years ago
danicampora
e19dfe1c32
cc3200: In scan results rename 'auth' field to 'sec'.
As defined by the new API, since 'auth' is actually a tuple
composed by the security type and the key.
9 years ago
Paul Sokolovsky
1b586f3a73
py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.
9 years ago
Daniel Campora
b6bdb0dbda
cc3200: Always reset WLAN after setting the mode.
9 years ago
Daniel Campora
ed6a5b78ad
cc3200: Make auth param positional in wlan.connect.
9 years ago
Daniel Campora
eb9a3ec654
cc3200: Disable uheapq and uhashlib.
Those two are rarely used features and better to have the extra heap.
9 years ago
Daniel Campora
37a2015cc5
tests/wipy: Add machine module tests.
9 years ago
Daniel Campora
c92e6a45eb
cc3200: Rename pyb module to machine.
9 years ago
Daniel Campora
ef369249cb
cc3200: Implement support for os.dupterm().
9 years ago
Daniel Campora
a7261ae059
cc3200/mods: Use mp_obj_get_array_fixed_n() where applicable.
9 years ago
Daniel Campora
57fa14b5be
cc3200: New WLAN API including test.
9 years ago
Daniel Campora
dbdcb58d64
cc3200: New irq API, affects all classes that provide the irq method.
9 years ago
Daniel Campora
dffa9f6da6
cc3200: New SD and RTC API plus os and time modules' extensions.
9 years ago
Daniel Campora
22b4c28f85
cc3200: New ADC API.
9 years ago