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.
2016-02-21 21:41:06 +01:00
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.
2016-02-21 21:41:06 +01:00
Paul Sokolovsky
4cd45f48b1
cc3200: Fix breakage after VfsFat refactor.
2016-02-15 10:39:56 +02:00
Paul Sokolovsky
96688de601
cc3200: Add stmhal/builtin_open.c to build.
2016-02-07 01:26:01 +02:00
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.
2016-01-11 00:49:27 +00:00
Paul Sokolovsky
0e1b5faad5
stmhal, cc3200: Actually implement machine -> umachine module weak link.
2015-12-18 22:22:43 +02:00
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 .
2015-12-18 02:39:52 +02:00
Damien George
9aaf888b42
cc3200: Add __get_BASEPRI and __set_BASEPRI inline function definitions.
2015-12-04 12:13:57 +00:00
danicampora
5d8164167e
cc3200: Correct buffer offset in serial flash diskio module.
2015-11-29 18:34:51 +01:00
Damien George
c3f64d9799
py: Change qstr_* functions to use size_t as the type for str len arg.
2015-11-29 14:25:04 +00:00
danicampora
db0a5aed39
cc3200: Bump version to 1.1.1.
2015-11-18 23:45:24 +01:00
danicampora
efc4da4be9
cc3200/README.md: Correct cc3200's update file name.
2015-11-18 20:10:19 +01:00
Gary Ashton-Jones
7080e9632c
cc3200/appsign.sh: Use md5 if running under Darwin.
2015-11-18 19:50:28 +01:00
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
2015-11-18 19:47:40 +01:00
danicampora
e4404fbef0
cc3200: Unmount all user file systems after a soft reset.
2015-11-16 23:43:47 +01:00
Paul Sokolovsky
73ff0687f2
lib/utils/printf: Move from stmhal/ .
...
This file contains various MicroPython-specific helper functions, so isn't
good fit for lib/libc/.
2015-11-10 18:58:58 +02:00
Paul Sokolovsky
746b752b8e
stmhal/moduselect: Expose POLLIN/OUT/ERR/HUP constants.
...
This makes select.poll() interface fully compatible with CpYthon. Also, make
their numeric values of these options compatible with Linux (and by extension,
with iBCS2 standard, which jopefully means compatibility with other Unices too).
2015-11-09 22:10:31 +02:00
Damien George
40274fec9c
lib/pyexec: Move header pyexec.h from stmhal directory.
2015-11-09 13:13:09 +00:00
Alex March
c27e5c4b0b
cc3200: FatFS configuration moved to the library folder.
...
Port specific settinigs defined in mpconfigport. FreeRTOS and semphr
headers added to define SemaphoreHandle_t for the SYNC_T.
2015-11-08 22:21:17 +00:00
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.
2015-11-06 00:12:13 +01:00
danicampora
1673e19cb9
cc3200: Make telnet server ignore NULL characters.
...
This fixes paste mode (Ctrl-E) which was not working for the
telnet REPL.
2015-11-05 21:42:58 +01:00
danicampora
056cb288d9
cc3200: Remove includes of rom.h (must be included via rom_map.h).
2015-11-01 23:33:12 +01:00
danicampora
f67d06194f
cc3200: Fix SPI clock divider calculation.
2015-11-01 23:33:12 +01:00
Paul Sokolovsky
000a12783c
cc3200: Use common pyexec.c .
2015-10-31 20:20:04 +03:00
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.
2015-10-31 19:14:30 +03:00
Paul Sokolovsky
9b12bc788f
cc3200: Switch from HAL_GetTick() to mp_hal_ticks_ms().
2015-10-29 20:43:11 +03:00
Paul Sokolovsky
f4decdc4a3
cc3200: Switch from HAL_Delay() to mp_hal_delay_ms().
2015-10-29 20:38:44 +03:00
danicampora
f3b1a933fc
cc3200: Actually allow to specify a custom build directory.
2015-10-28 11:09:45 +01:00
danicampora
a0fb7a76cd
cc3200: Fix bug in FTP command buffer, and set listening backlog to 0.
2015-10-28 00:08:53 +01:00
danicampora
1950295735
cc3200: Set pin direction first, then value. Fixes #1542 .
2015-10-26 23:26:43 +01:00
Martijn Koster
8e8aac89a5
cc3200: Update README to change pyb to machine.
2015-10-25 21:36:01 +01:00
danicampora
a654914de4
cc3200: Allow to read pin value when in OPEN_DRAIN mode.
2015-10-25 21:31:43 +01:00
danicampora
a3a33db409
cc3200: Enable WLAN irq on creation.
2015-10-25 21:31:42 +01:00
danicampora
0212dc65b7
cc3200: Add created sockets to the registry.
2015-10-22 16:35:04 +02:00
danicampora
8fd8bb36b3
cc3200: Bump version to 1.1.0
...
Incluides several improvements and a few API changes to comply
with the new hardware API.
2015-10-21 16:42:14 +02:00
danicampora
075ca64521
cc3200: Fix UART tests after correcting uart.read() behaviour.
2015-10-21 15:30:57 +02:00
danicampora
be2879ce89
cc3200: Enable "all special methods" configuration option.
2015-10-21 15:30:57 +02:00
danicampora
1f2daf4304
cc3200: Correct ticks_cpu and ticks_us functions in time module.
2015-10-21 15:30:57 +02:00
danicampora
1c7f9b16f0
cc3200: Remove UART info on README.md.
...
The UART REPL it's not enabled by default anymore.
2015-10-21 15:30:56 +02:00
danicampora
04db848dc7
docs: Add usocket and ussl modules' documentation.
2015-10-21 15:30:56 +02:00
danicampora
4b630c452d
cc3200: Make socket.listen([backlog]) compliant with Python 3.5.
2015-10-21 15:30:56 +02:00
danicampora
719dca2515
cc3200: Clean-up socket constants.
2015-10-21 15:30:56 +02:00
danicampora
d67ea6b29f
cc3200: Add comment about micropython extensions to standard modules.
2015-10-21 15:30:56 +02:00
danicampora
7ff585333e
cc3200: uart.read() returns EGAIN if no chars available.
2015-10-21 15:30:56 +02:00
danicampora
9a507c67ad
cc3200: Enable REPL autoindent.
2015-10-21 15:30:56 +02:00
danicampora
9c72c71c05
cc3200: WLAN class can retrieve the existing instance.
2015-10-19 21:17:15 +02:00
danicampora
ae70e98ed4
cc3200: Fix time.ticks_* functions.
2015-10-19 21:17:15 +02:00
danicampora
36ae417c9f
docs: Add wipy and network.server documentation.
2015-10-19 21:17:15 +02:00
danicampora
2e0cd20a1d
cc3200: Refactor network module to make the server a propper object.
2015-10-19 21:17:15 +02:00
danicampora
65f6324573
cc3200: Increase stack sizes a bit.
2015-10-19 21:17:15 +02:00
danicampora
d8137178bb
cc3200: Create wipy module, remove HeartBeat class.
...
The heartbeat is now controllable via a single function within the
wipy module.
2015-10-19 21:17:15 +02:00
danicampora
4542643025
docs: Update all WiPy docs to reflect the new API.
2015-10-17 23:29:04 +02:00
danicampora
fca3308cc3
cc3200: Improvements to terminal duplication.
2015-10-17 23:21:44 +02:00
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.
2015-10-17 23:21:44 +02:00
Damien George
0334058fa4
Rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc.
2015-10-12 00:06:25 +01:00
Paul Sokolovsky
1b586f3a73
py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.
2015-10-11 15:18:15 +03:00
Daniel Campora
ff736d6f6f
cc3200: WiPy SW v1.0.0 release.
2015-09-28 00:14:25 +02:00
Daniel Campora
b6bdb0dbda
cc3200: Always reset WLAN after setting the mode.
2015-09-27 20:12:42 +02:00
Daniel Campora
ed6a5b78ad
cc3200: Make auth param positional in wlan.connect.
2015-09-27 19:10:09 +02:00
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
37a2015cc5
tests/wipy: Add machine module tests.
2015-09-27 17:35:58 +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
a7261ae059
cc3200/mods: Use mp_obj_get_array_fixed_n() where applicable.
2015-09-27 09:28:27 +02:00
Daniel Campora
635ef16432
cc3200/tools: Improve update script robustness.
2015-09-27 02:00:46 +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
06d93b36f9
cc3200: Correct safe boot level 1 blinking period.
2015-09-21 22:30:04 +02:00
Daniel Campora
22b4c28f85
cc3200: New ADC API.
2015-09-16 10:10:38 +02:00
Daniel Campora
0e52d9860a
tests/wipy: Improve I2C tests.
2015-09-16 10:10:35 +02:00
Daniel Campora
aba75e1233
cc3200: New SPI API.
2015-09-16 10:10:33 +02:00
Daniel Campora
624cdeacc4
docs/wipy: Add pins to the I2C constructor.
2015-09-16 10:10:31 +02:00
Daniel Campora
41f6948545
cc3200: New WDT API.
2015-09-16 10:10:29 +02:00
Daniel Campora
8332044f75
cc3200: Add UART.ODD and UART.EVEN to select parity.
2015-09-16 10:10:26 +02:00
Daniel Campora
d5ec336eef
cc3200: Replace Pin.PULL_NONE with None.
2015-09-16 10:10:24 +02:00
Daniel Campora
e77abc261b
cc3200: Default peripheral ID support on I2C.
2015-09-16 10:10:19 +02:00
Daniel Campora
c69642a460
cc3200: Increase error led blynk period to 100ms
2015-09-16 10:10:17 +02:00
Daniel Campora
3c4b78e166
cc3200: Keep overwriting the same image on sequential updates.
2015-09-16 10:10:15 +02:00
Daniel Campora
7d6b6f6681
cc3200: Make UART choose default id when not given.
2015-09-16 10:10:13 +02:00
Daniel Campora
4ba9b34012
cc3200: Reduce servers cycle time to improve FTP transfer rate.
2015-09-16 10:10:11 +02:00
Daniel Campora
f352fe82a5
tests/wipy: Add I2C tests.
2015-09-10 08:00:59 +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
425958b616
cc3200: Add SDcard pin af on index 8.
2015-09-10 08:00:41 +02:00
Daniel Campora
d936317143
cc3200: New I2C API.
2015-09-10 08:00:30 +02:00
Daniel Campora
359b4e9ed9
cc3200: Refactor pin af assigment functions.
2015-09-10 08:00:24 +02:00
Daniel Campora
1d399c3c88
cc3200: Improve file system check routine.
2015-09-10 08:00:18 +02:00
Daniel Campora
4d7fa05b43
cc3200: Improve Pin and UART implementation.
...
Deassign pins af before assigning. Make uart.any() return the
correct value everytime, this requires interrupts to be always
enabled.
2015-09-10 08:00:12 +02:00
Daniel Campora
4054c4eadd
cc3200: Remove I2C inline documentation (sphinx is on the lead).
2015-09-10 08:00:05 +02:00
Daniel Campora
f91f212d9f
cc3200: New UART API plus related test.
2015-09-10 07:59:47 +02:00
Daniel Campora
36821d095a
cc3200: Add alternate functions list to Pin object.
...
Also remove pin.high() and pin.low() methods.
2015-09-10 07:59:41 +02:00
Daniel Campora
d5e256486e
cc3200: Re-work Pin class according to the new API.
...
Also add relevant test.
2015-09-10 07:59:35 +02:00
Daniel Campora
42054c3cad
cc3200: Add mphal error to raise hardware related exceptions.
2015-09-10 07:59:29 +02:00
Daniel Campora
598aad2140
cc3200: Fix bug in pybsleep remove.
2015-09-10 07:59:23 +02:00
Daniel Campora
475c60eefc
cc3200: Add alt param to Pin constructor.
2015-09-10 07:59:16 +02:00
Daniel Campora
86854c7071
cc3200: Adapt smoke.py for the new pin API.
2015-09-10 07:59:10 +02:00
Daniel Campora
e3f8777ee8
cc3200: Implement new Pin API.
2015-09-10 07:59:03 +02:00
Daniel Campora
ec8589e4c9
cc3200: Improve uniflash script and make it a bit more verbose.
2015-09-10 07:56:48 +02:00
Daniel Campora
b864e7afe4
cc3200: Remove the UART0 programming pins from the smoke test.
2015-09-10 07:56:46 +02:00
Daniel Campora
0e978349a5
cc3200: Correct smoke test expected result.
2015-08-16 20:18:16 +02:00
Daniel Campora
e9fa7625f4
cc3200: Correct WLAN constructor argument checking.
2015-08-16 20:18:13 +02:00
Daniel Campora
c0c07fb1b6
cc3200: Don't clear the WDT special bit in the bootloader.
2015-08-16 20:18:11 +02:00
Daniel Campora
aa8e8acb7d
cc3200: Change HeartBeat period from 5 to 4 seconds.
2015-08-16 20:18:09 +02:00
Daniel Campora
f837d166e5
cc3200: Fix typo in modpyb.
2015-08-16 20:18:07 +02:00
Daniel Campora
9249242119
cc3200: Remove unneeded loops in the FreeRTOS hooks.
2015-08-16 20:18:05 +02:00
Daniel Campora
641a3d39e1
cc3200: Make sure to update sleep objects when registered.
2015-08-16 20:18:02 +02:00
Daniel Campora
6ff2d54347
cc3200: Small renaming in wdt functions for the sake of consistency.
2015-08-16 20:18:00 +02:00
Daniel Campora
11d21081b4
cc3200: Rework SD API. Increase heap to avoid malloc failures.
2015-08-16 20:17:58 +02:00
Daniel Campora
34c290b678
cc3200: Rename SPI nss param to cs.
...
The nss param in the pyboard has a different meaning that doesn't
apply to the WiPy.
2015-08-16 20:17:55 +02:00
Daniel Campora
ea5061e409
cc3200: Improve callback API.
...
Rename "wakes" param to "wake_from" and make "value" an object
instead of an integer.
2015-08-16 20:17:52 +02:00
Daniel Campora
4c5bfe2d10
cc3200: Server side SSL socket requires both certfile and keyfile.
2015-08-16 20:17:49 +02:00
Daniel Campora
7027fd5343
cc3200: Make ADC API compatible with the pyboard.
2015-08-10 23:42:05 +02:00
Daniel Campora
7da2fdc3cd
cc3200: On the first boot, always make AP ssid='wipy-wlan'.
...
On the first boot don't add the MAC address, this is to speed up
factory testing.
2015-08-09 22:16:45 +02:00
Daniel Campora
2673374d18
cc3200: Refactor PRCM special user bits implementation.
2015-08-09 22:15:18 +02:00
Daniel Campora
651c870d77
cc3200: Speed up file system checking during start-up.
2015-08-09 22:09:16 +02:00
Daniel Campora
aa3569cd57
cc3200: Add factory smoke test as part of the tools.
2015-08-09 19:22:26 +02:00
Daniel Campora
8cd9fedf58
cc3200: Add script to program the WiPy via UniFlash (windows only...).
2015-08-09 19:22:23 +02:00
Daniel Campora
e23ae63970
cc3200: Fix bug in ffconf regarding '/flash' string length.
...
This bug was introduced when renaming '/sflash' to '/flash'.
2015-08-09 19:22:21 +02:00
Daniel Campora
31f6a6fa70
cc3200: Enable bootloader safe boot on latest firmware.
...
The first safe boot level executes the latest firmware but skips
'main.py' and 'boot.py'.
2015-08-09 19:22:19 +02:00
Daniel Campora
e54a4f1f48
cc3200: Improve support for WEP security.
...
Key is always entered as a string, but if security is WEP, the key
is converted automatically to hex before connecting or configuring
the device as an AP.
2015-08-09 19:22:16 +02:00
Daniel Campora
00c4d6562e
cc3200: Add nic.iwconfig() to set/get WLAN configuration.
...
Changes are based on this post:
https://github.com/micropython/micropython/issues/876#issuecomment-115255551
The constructor can optionally take the same params of iwconfig in
order to configure WiFi when creating the object. Params are
keyworkd only. The WiPy accepts:
- mode (int -> WLAN.AP or WLAN.STA)
- ssdi (string)
- security (int -> WLAN.OPEN, WLAN.WEP, WLAN.WPA, WLAN.WPA2)
- key (string)
- channel (int (1-11))
- antenna (int -> WLAN.INTERNAL, WLAN.EXTERNAL)
2015-08-09 19:22:12 +02:00
Daniel Campora
c6926c374d
cc3200: Make I2C and SPI API the same as in stmhal.
2015-08-02 20:22:15 +02:00
Daniel Campora
aa58c7ec74
cc3200: Append last 2 bytes of the MAC address to the default SSID.
2015-07-30 00:43:16 +02:00
Daniel Campora
b56634e691
cc3200: On ssl.read() or ssl.readall() ignore ssl layer closed error.
2015-07-30 00:43:14 +02:00
Daniel Campora
fb3f9cff33
cc3200: Switch to 1 byte hash for QSTRs.
2015-07-30 00:43:13 +02:00
Daniel Campora
9a348fc840
cc3200: Add socket.makefile()
2015-07-30 00:43:10 +02:00
Daniel Campora
007878781c
cc3200: Rename pins from GPIO to just GP.
...
This is how the names will be printed on the sticker that goes on top
of the EMI shield. The shorter names also help saving a few bytes of
RAM and ROM.
2015-07-30 00:43:08 +02:00
Daniel Campora
f22b35e4e5
cc3200: Add socket.sendall() (aliases to send()).
...
Simplelink's socket send checks for the size of the packet and sends
it in chunks if the size is too large.
2015-07-17 11:38:01 +02:00
Daniel Campora
a243d6b057
cc3200: Make socket stream methods return POSIX error codes.
2015-07-16 22:39:35 +02:00
Daniel Campora
f738424403
cc3200: Remove superflous assignment since the result is not used.
2015-07-15 14:45:24 +02:00
Daniel Campora
753a8e8bc4
cc3200: Create /flash/cert folder if it doesn't exist.
2015-07-15 14:25:35 +02:00
Daniel Campora
e955089da0
cc3200: Implement new OTA mechanism with 2 firmware update slots.
2015-07-15 14:25:28 +02:00
Daniel Campora
cf814b2d34
cc3200: Refactor and clean-up socket closing code.
2015-07-10 11:37:50 +02:00
Daniel Campora
ecb7f9fe58
cc3200: Set simplelink time and date when enabling WLAN.
2015-07-10 11:37:48 +02:00
Daniel Campora
fa47bebfbc
cc3200: Add struct weak link for ustruct.
2015-07-10 11:37:46 +02:00
Daniel Campora
af33ebb13b
cc3200: Increment telnet Tx retry delay on every try.
2015-07-09 17:30:17 +02:00
Daniel Campora
9220dc466a
cc3200: Correct udelay us to ticks calculation.
2015-07-08 13:13:37 +02:00
Daniel Campora
d18ced9cdd
cc3200: Use alternative HAL_Delay also when interrupts are disabled.
2015-07-08 12:48:35 +02:00
Daniel Campora
a0a3de60be
cc3200: Translate simplelink's socket error numbers to POSIX values.
2015-07-07 16:13:54 +02:00
Daniel Campora
5685b565c3
cc3200: Create /flash/sys and /flash/lib directories while booting.
2015-07-07 16:13:40 +02:00
Daniel Campora
76e52b5daf
cc3200: Make update-wipy.py more robust.
2015-07-07 16:11:48 +02:00
Daniel Campora
fa655ce196
cc3200: Improve interrupt handling and fix bug in HAL_Delay().
2015-07-07 16:11:05 +02:00
Daniel Campora
194c8c761e
cc3200: Increment interrupt stack size from 2K to 3K.
2015-07-07 16:10:10 +02:00
Daniel Campora
aaf7c5b35e
cc3200/README.md: Improve make deploy instructions.
2015-07-04 16:39:05 +02:00
Daniel Campora
c030e77861
cc3200: Enable base64 methods from modubinascii.
2015-07-04 16:33:54 +02:00
Daniel Campora
219a74c014
cc3200/README.md: Add notes about deploying a new software version.
2015-07-04 16:32:49 +02:00
Daniel Campora
31b40eebe8
cc3200: Fix socket recv and recvfrom return value type.
2015-07-02 23:17:22 +02:00
Daniel Campora
5161239c9f
cc3200: time.sleep() now receives seconds, like CPython.
2015-07-02 17:23:22 +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
7c1c9af5d4
cc3200: Code clean-up on pybpin.
2015-07-02 16:29:51 +02:00