Commit Graph

53 Commits

Author SHA1 Message Date
Daniel Campora 1811c6bccf cc3200: Remove Timer.AB constant.
Timer.A and Timer.B can be ORed for this purpose.
2015-06-10 23:35:43 +02:00
Daniel Campora 95cc1ff542 cc3200: Re-name pyb.hard_reset() to pyb.reset(). 2015-06-10 23:35:40 +02:00
Daniel Campora 3319780e96 cc3200: Add sendbreak method to the UART. 2015-06-10 23:35:35 +02:00
Daniel Campora 8a6d93aeed cc3200: Make UART API more similar to stmhal. 2015-06-10 23:35:33 +02:00
Daniel Campora a3acaa000c cc3200: Add antenna selection feature to WLAN. 2015-06-07 00:06:27 +02:00
Daniel Campora cc20482aa9 cc3200: Add method to configure the servers timeout.
With network.server_timeout(secs) the timeout can be changed.
The default value is 300 secs. Minimmum accpeted is 5 secs.
Without params the function returns the current configured timeout.
2015-06-03 17:31:21 +02:00
Daniel Campora 84d11b5e53 cc3200: Add period set method to the Timer class. 2015-05-29 15:54:46 +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 8096be089e cc3200: Add make_new method to the WDT. 2015-05-27 09:45:25 +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 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 56053c37cf cc3200: Rewrite WLAN.ifconfig(). Add WLAN.info() and WLAN.connections(). 2015-05-20 11:44:21 +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 8e611e8414 cc3200: Add Timer module. Supports free running, PWM and capture modes. 2015-05-17 12:34:49 +02:00
Daniel Campora 2b62707051 cc3200: Add os.rename() 2015-05-17 12:22:17 +02:00
Daniel Campora 2bdefea9d6 cc3200: Enable MICROPY_MODULE_WEAK_LINKS. 2015-05-07 12:19:31 +02: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 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 f7a26472af cc3200: Add IPPROTO_SEC to be able to create secure sockets. 2015-04-14 01:57:27 +02:00
Daniel Campora c69b4310c8 cc3200: Add WLAN.config_ip().
This new method allows to assign an static IP to the device.
2015-04-13 00:02:56 +02:00
Daniel Campora 6e25d955f4 cc3200: Enable long filename support in FatFS.
This has implications all over the place. I have to admit that
you can instantly see that usability improves, but it costs 3K.
At the same time I took the oportunity to rename the '/SFLASH'
drive to '/flash' which improves compatibility with the pyboard.
2015-04-11 13:35:05 +02:00
Daniel Campora d460a30711 cc3200: Add specific version file for the CC3200 port.
Current version has been numbered as 0.9.0 since Timers/PWM support
is still missing.
2015-03-31 14:34:09 +02:00
Daniel Campora 2d717ad97a cc3200: Add callback support to the UART for RX interrupts. 2015-03-26 10:28:43 +01:00
Daniel Campora e909e38871 cc3200: Remove superflous parameters from the SPI API. 2015-03-26 10:28:41 +01:00
Daniel Campora 7f41f650de cc3200: Remove superflous params from the I2C API. 2015-03-25 16:56:14 +01:00
danicampora cd9bc14c8f cc3200: Add SPI module.
Only MASTER mode is supported. Transfer width is configurable to
8, 16 or 32 bits.
2015-03-21 11:26:47 +01:00
danicampora f8ee88bbe0 cc3200: Move server methods from WLAN to the network module. 2015-03-19 17:08:25 +01:00
danicampora 963d7c7ee6 cc3200: Refactor I2C. Remove all references to SLAVE mode. 2015-03-18 21:54:41 +01:00
danicampora 2c103d5200 cc3200: Rewrite the PRCM RTC functionality methods.
This allows to use the On-Chip retention registers for both the
RTC and to share notification flags between the bootloader and the
application. The two flags being shared right now are the "safe boot"
request and the WDT reset cause. we still have 2 more bits free for
future use.
2015-03-14 10:08:47 +01:00
danicampora 04749e677f cc3200: Allow separate selection of the power mode in Pin callbacks. 2015-03-12 16:22:17 +01:00
danicampora 6ae9383f63 cc3200: Remove WLAN.getmode since it's superseded by WLAN.ifconfig. 2015-03-12 16:22:13 +01:00
danicampora 9e44383e3f cc3200: Add power management framework. Add mpcallback class.
Supports suspend and hibernate modes. Waking is possible throug GPIO
and WLAN.
The mpcallback class is generic and can be reused by other classes.
2015-03-11 17:00:33 +01:00
danicampora 73aee8da54 cc3200: Merge ExtInt class into Pin class.
Also add another method to change the pin's interrupt mode
on the fly.
2015-03-11 17:00:28 +01:00
danicampora 0475de1350 cc3200: Make WDT and HeartBeat constant objects on their own right. 2015-03-11 16:54:05 +01:00
danicampora d01060241a cc3200: Add heartbeat signal on system led. 2015-02-28 19:03:21 +01:00
danicampora 11aa6ba456 cc3200: Add WDT functionality as part of the pyb module.
Also improve pybsd, and make it save it's pin configuration.
This is a necessary step towards supporting the CC3200 low
power deep sleep (LPDS) mode.
2015-02-25 11:37:29 +01:00
danicampora 88b7f52ebb cc3200: Replace WLAN.get_ip() with WLAN.ifconfig().
Also change other methods' names to make them consistent.
2015-02-23 15:02:55 +01:00
danicampora 4bfc491753 cc3200: Add wlan_urn() thanks to Nadim El-Fata and Bryan Morrissey. 2015-02-22 18:43:01 +01:00
danicampora 18605b36dc cc3200: Rename SD.config() to SD.config_pins(). 2015-02-21 22:27:48 +01:00
danicampora c020109cfa cc3200: Add SD module and disable SD card support for the LAUNCHXL. 2015-02-21 14:19:40 +01:00
danicampora 6b21c3fdd6 cc3200: Refactor UART and I2C object creation.
I2C objects can be freed by the GC and a __del__ method is provided
in order to de-init the peripheral prior to being garbage collected.
UART objects are now added to a local list and this list is now part
of the VM_STATE.
2015-02-20 16:41:55 +01:00
danicampora 868fa82ea4 cc3200: Add ADC module. 2015-02-20 16:40:59 +01:00