Daniel Campora
417205623a
cc3200: Fix incorrect type for the wake cause variable.
2015-05-29 15:54:16 +02:00
Daniel Campora
2f2c0a13fb
cc3200: Clean up WLAN API. Make WLAN.info() an attrtuple.
2015-05-29 15:48:41 +02:00
Daniel Campora
622f241317
cc3200: Rename pyb.reset() to pyb.hard_reset() and add pyb.unique_id().
2015-05-29 10:22:20 +02:00
Daniel Campora
2abb58d758
cc3200: Rename Pin.get_config() to Pin.info().
2015-05-28 13:10:46 +02:00
Daniel Campora
1580e331ef
cc3200: Make small changes in WLAN to improve the API.
2015-05-28 13:10:44 +02:00
Daniel Campora
c754d8011d
cc3200: Simplify SPI polarity and phase checks in constructor.
2015-05-27 09:45:32 +02:00
Daniel Campora
9414f92fa9
cc3200: Fix I2C and SPI module references.
2015-05-27 09:45:27 +02:00
Daniel Campora
8096be089e
cc3200: Add make_new method to the WDT.
2015-05-27 09:45:25 +02:00
Daniel Campora
fca3493442
cc3200: Add make_new method to the RTC, like in stmhal.
2015-05-27 09:45:24 +02:00
Daniel Campora
5a0c5f8fea
cc3200: Use the WDT stall feature in debug mode only.
2015-05-27 09:45:22 +02:00
Daniel Campora
ec1f0e7551
cc3200: Use MCU reset instead of SOC reset.
...
I have seen the CC3200 hanging a couple of times, and according to TI
itself the SOC reset is not reliable, which explains my observations.
2015-05-27 09:45:21 +02:00
Daniel Campora
fabe79f7af
cc3200: Clean up exception handling.
2015-05-26 12:29:20 +02:00
Daniel Campora
124aa000af
cc3200: Use polarity and phase instead of submode in the SPI construct.
2015-05-26 11:30:48 +02:00
Daniel Campora
2dd47239de
cc3200: Make API more similar to stmhal.
...
In general the changes are:
1. Peripheral (UART, SPI, ADC, I2C, Timer) IDs start from 1, not zero.
2. Make I2C and SPI require the ID even when there's only one bus.
3. Make I2C and SPI accept 'mode' parameter even though only MASTER
is supported.
2015-05-25 21:47:19 +02:00
Daniel Campora
6545336206
cc3200: Make the WDT aware of the servers sleep/wake state.
2015-05-25 21:14:54 +02:00
Daniel Campora
5cd34aca27
cc3200: Use the correct ADC channel index when creating the object.
2015-05-25 21:14:46 +02:00
Daniel Campora
3cb804de26
cc3200: Remove NIC abstraction layer.
...
That layer is nice, but the CC3200 doesn't need it and getting rid of
it saves ~200 bytes, which are more than welcome.
2015-05-24 11:44:08 +02:00
Daniel Campora
9f8c5456be
cc3200: Reset the servers and close user sockets on WLAN disconection.
...
This is needed to avoid half-open connections.
2015-05-24 11:44:06 +02:00
Daniel Campora
ed56b0baba
cc3200: Finally unlock the full wake on WLAN feature set.
2015-05-22 19:53:33 +02:00
Daniel Campora
18030bd85d
cc3200: Add own ubinascii module.
...
The reason to have our owm ubinascii module is so that later we
can add crc32 support using the hardware engine.
2015-05-22 09:56:11 +02:00
Daniel Campora
7506db4ccb
cc3200: Remove uhashlib.hexdigest().
2015-05-21 18:51:57 +02:00
Daniel Campora
e800db562f
cc3200: Add uhashlib. Supports SHA1 and SHA256.
2015-05-20 11:44:24 +02:00
Daniel Campora
5e38b48dd6
cc3200: Fix time.localtime() so that it returns the correct fields.
2015-05-20 11:44:22 +02:00
Daniel Campora
56053c37cf
cc3200: Rewrite WLAN.ifconfig(). Add WLAN.info() and WLAN.connections().
2015-05-20 11:44:21 +02:00
Daniel Campora
6f848b6dba
cc3200: Set the timer edge count interrupt value in the calbback const.
2015-05-17 16:11:12 +02:00
Daniel Campora
95a4f61499
cc3200: Make sure RTC wake value is >= 1ms.
2015-05-17 16:09:27 +02:00
Daniel Campora
c27dc38e85
cc3200: Re-name 'intmode' to 'mode' in the callback API.
2015-05-17 14:49:17 +02:00
Daniel Campora
cd3f2523f1
cc3200: Disable WLAN.urn() by default.
...
Can be enabled by defining MICROPY_PORT_WLAN_URN=1 in mpconfigport.h.
2015-05-17 14:20:24 +02:00
Daniel Campora
a379b6ed11
cc3200: Add optional timeout param to WLAN.connect().
2015-05-17 14:05:44 +02:00
Daniel Campora
fb9e4cf463
cc3200: Make sure to handle all pending pin interrupts.
...
When entering the interrupt handler of a given GPIO port, more than
one pin could have pending interrupts, therefore care must be taken
to service each interrupt one by one before leaving.
2015-05-17 13:42:15 +02:00
Daniel Campora
8e611e8414
cc3200: Add Timer module. Supports free running, PWM and capture modes.
2015-05-17 12:34:49 +02:00
Daniel Campora
9466e154b4
cc3200: Fix power mode param check in the UART callback constructor.
2015-05-17 12:26:40 +02:00
Daniel Campora
2b62707051
cc3200: Add os.rename()
2015-05-17 12:22:17 +02:00
Josef Gajdusek
1db4253886
lib: Move time utility functions to common library.
2015-05-13 00:12:54 +01:00
Damien George
c50772d19f
py: Add mp_obj_get_int_truncated and use it where appropriate.
...
mp_obj_get_int_truncated will raise a TypeError if the argument is not
an integral type. Use mp_obj_int_get_truncated only when you know the
argument is a small or big int.
2015-05-12 23:05:53 +01:00
Josef Gajdusek
04ee5983fe
lib: Move some common mod_network_* functions to lib/netutils.
2015-05-04 11:48:40 +01:00
Daniel Campora
8c8d7f3c60
cc3200: Clean up pyb.Pin
...
Remove unused and unneeded functions, also create Pin.get_config() that
returns the whole configuration of the pin.
This reduces code size by ~500 bytes.
2015-05-03 11:26:56 +02:00
Daniel Campora
e4c899a08c
cc3200: WLAN.ifconfig returns an attrtuple instead of a dictionary.
2015-05-03 11:26:25 +02:00
Daniel Campora
f54bdecff2
cc3200: Implement Sleep.wake_reason()
2015-05-03 11:21:14 +02:00
Daniel Campora
71d482df47
cc3200: Clear the pending interrupt flag when disabling RTC callbacks.
2015-05-03 11:21:12 +02:00
Daniel Campora
6f218d7472
cc3200: Move wlan_init0() to the boot section.
...
This one creates a semaphore, therefore it must be executed only
after a hard reset (or when coming out of hibernation).
2015-04-29 16:10:40 +02:00
Daniel Campora
d8713d78f5
cc3200: Correct Sleep module name. Must be 'Sleep', not 'sleep'.
2015-04-29 15:27:28 +02:00
Daniel Campora
dbb4aef5e3
cc3200: Make WLAN.isconnected() also work in AP mode.
...
While in STA mode isconnected() returns True when connected to an AP
and the IP has been acquired. In AP mode, WLAN.isconnected() returns
True if at least one connected station is present.
2015-04-29 15:26:21 +02:00
Damien George
95f53461c2
py: Replace py-version.sh with makeversionhdr.py, written in Python.
...
Also rename py-version.h to mpversion.h for consistency with mpconfig.h.
2015-04-28 23:52:36 +01:00
Daniel Campora
d11317bcab
cc3200: Make WLAN scan results a list of attrtupple.
...
Each result is displayed like this:
ssid='MySSID', bssid=b'\xc0J\x00z.\xcc', security=2, channel=None, rssi=-74
The CC3200 doesn't provide channel info, that why is 'None'.
2015-04-29 00:04:01 +02:00
Daniel Campora
f81684141e
cc3200: Implement os.uname() to get details of the OS and hardware.
2015-04-29 00:03:56 +02:00
Daniel Campora
d34c4784a5
cc3200: Select NIC when the socket is created.
...
This makes sense since only WLAN is supported here.
2015-04-28 15:14:36 +02:00
Daniel Campora
7c8b4c1a8b
cc3200: Correct MAKE_SOCKADDR and UNPACK_SOCKADDR byte order.
2015-04-25 23:36:45 +02:00
Damien George
259eaab9a9
cc3200: Clean up and reduce use/include of std.h.
2015-04-18 14:29:28 +01:00
Daniel Campora
c1a77a0c9f
cc3200: Use new %q format to print qstr's where appropiate.
2015-04-17 10:15:55 +02:00