Commit graph

242 commits

Author SHA1 Message Date
Angus Gratton 1e44f72e98 esp_wifi_init: Update comment about init event_q
Closes github #28 https://github.com/espressif/esp-idf/issues/28
2016-12-28 10:17:56 +11:00
Angus Gratton c1a6d55116 WiFi interface: SSID and password fields should be uint8_t in all cases
Closes github #40 https://github.com/espressif/esp-idf/issues/40
2016-12-28 10:17:56 +11:00
Wangjialin b00b75db7e driver: sigma-delta
1. add sigma-delta code and example.
2. add gpio output signal in io matrix.

Squashed commits:
[a25e7d4] minor changes for doc
[6a03a1e] minor changes on comments and doc.
[97dd9e4] Add doc.
update index.rst
change example index
2016-12-18 17:20:17 +08:00
Ivan Grokhotkov 628bad1dbf deep sleep: add documentation 2016-12-16 14:31:29 +08:00
Ivan Grokhotkov 370f4b8556 deep sleep: set pin configuration right before entering deep sleep
This change allows setting pin configuration for EXT1 wakeup depending on the state of RTC_PERIPH power domain:
- if peripherals are enabled (due to another wakeup mode, or due to esp_deep_sleep_pd_config call), we can keep internal pullups/pulldowns enabled
- if peripherals are disabled, pullups and pulldowns need to be disabled as well

Also add comments about the purpose of registers being configured.
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 609d852834 deep sleep: power down RTC peripherals in EXT1 sleep 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 35115885c5 deep sleep: add API to control power down 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 88ddf5aefa deep sleep: rename header file 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 3b854fe46a deep sleep: implement wake up using ULP, EXT0, EXT1 sources
This adds the following APIs to enable various wakeup sources:
- esp_deep_sleep_enable_timer_wakeup
- esp_deep_sleep_enable_ulp_wakeup
- esp_deep_sleep_enable_ext0_wakeup
- esp_deep_sleep_enable_ext1_wakeup

And an API to start deep sleep:
- esp_deep_sleep_start
2016-12-16 14:30:27 +08:00
Angus Gratton d246836cfc Merge branch 'feature/spiflash_unaligned_readwrite' into 'master'
Remove alignment reqs from spi_flash_{read,write}

Github pull request https://github.com/espressif/esp-idf/pull/155

See merge request !311
2016-12-16 13:28:12 +08:00
Liu Zhi Fu 3984d96acb esp32: refactor to sniffer
1. TW8657, WIFI send the whole packet to smartconfig;
2. modify API annotation of smartconfig and sniffer;
3. export smartconfig APIs to programming guide;
2016-12-15 18:20:00 +08:00
Jeroen Domburg 1e117dc3d3 Fix small things noticed in MR, add documentation 2016-12-15 15:03:22 +08:00
Jeroen Domburg 293ad4cd36 Add xPortGetFreeHeapSizeCaps and xPortGetMinimumEverFreeHeapSizeCaps plus everything it entails. Allows querying the available memory for various capabilities. Also: xPortGetFreeHeapSize and xPortGetMinimumEverFreeHeapSize now return the expected value. Bonus: the linked list used in the allocator is now 4 bytes smaller, which should save some memory. 2016-12-15 15:03:22 +08:00
Deomid Ryabkov d288a3d053 Remove alignment reqs from spi_flash_{read,write} 2016-12-15 10:07:31 +11:00
Angus Gratton bab1d49f1f Merge branch 'feature/esptool_flash_encryption' into 'master'
Flash encryption support

Flash encryption support in build system, tooling

To come in future MR:
* On-device key generation on first boot (for production devices), need to finalise testing of bootloader entropy seeding.
* spi_flash_encrypted_write to support non-32-byte block writes (at least optionally.)
* I think a lot of the bootloader_support component can possibly be rolled into "spiflash" and other components, to use a common API.

See merge request !240
2016-12-12 06:50:46 +08:00
Jeroen Domburg bf57594ebe Merge branch 'feature/intr_alloc' into 'master'
Add dynamic interrupt allocation mechanism

This adds:
- Dynamic allocation of interrupts. Pass it the features of the interrupt you want, it'll set you up with an int.
- Shared interrupts. Enables multiple peripheral drivers to use the same interrupt. 
- Marking what interrupts are fully executable from IRAM; if an int isn't marked like that it will get disabled once flash cache gets disabled.

Also:
- Modifies driver to be in line with these changes

See merge request !254
2016-12-09 14:00:39 +08:00
Angus Gratton 8ba75a1e9f SPI flash: Block erase size 64KB not 32KB
Reverts changes made in 9f9d92b2df
2016-12-09 14:18:58 +11:00
Jeroen Domburg 2c34ab3374 Mark some interrupts that are now allocated dynamically as free, add int handle param documentation, add local ints test 2016-12-08 12:39:33 +08:00
Jeroen Domburg 9dc908d105 Add test for local interrupts, fix int disable code 2016-12-08 12:39:33 +08:00
Jeroen Domburg ae8c37e0b6 Add disabling/enabling of shared interrupt, add testcase for interrupts 2016-12-08 12:39:33 +08:00
Jeroen Domburg 32fa94935d Changes according to merge request 2016-12-08 12:39:33 +08:00
Jeroen Domburg 655fd2986a Add interrupt allocation scheme / interrupt sharing. Also modifies drivers and examples. Also allows interrupts
to be marked specifically as having a handler that's all in IRAM.
2016-12-08 12:39:33 +08:00
Ivan Grokhotkov b57aecdfe9 uart_tx_wait_idle: fix issue with last character not transmitted
- ROM function uart_tx_wait_idle may have a bug which causes the function to return before the final character is fully transmitted.
  This replaces uart_tx_wait_idle declaration with a static inline definition which fixes the issue.
- Also replaces the use of uart_tx_flush with uart_tx_wait_idle in esp_restart, to remove garbage in console output on restart.
- rtc_printf is temporary replaced with a no-op, pending a new release of librtc.a. Current release assumes that UART0 is used for output,
  and switches UART0 baud rate while doing frequency changes and printing some log output. This doesn’t work if a different UART is used for output.
2016-12-08 01:42:37 +08:00
Chu Shu Chen b1db2721dc driver: add rtc module and bugfix gpio32 gpio33
feature(rtc_module):add rtc module

1. add rtc io control API (pull,output and input)
2. add touch pad API (touch pad read and interrupt)
3. add adc1 API (the max width is 12 Bits and support attenuation)
4. add hall sensor API (support hall sensor read )
5. add dac API (the width is 8 Bits)

bugfix(gpio):gpio32 and gpio33 can not output and input

the gpio32 and gpio33 is initialize by librtc.a,and gpio_config not initialize the gpio as
digital gpio.they can not output and input,when users use gpio32 or gpio33.And there are some problems
about others driver ,when they use gpio32 or gpio33 as  matrix.
2016-12-07 15:56:13 +08:00
Angus Gratton 9eb135fd73 Flash encryption: Support enabling flash encryption in bootloader, app support
* App access functions are all flash encryption-aware
* Documentation for flash encryption
* Partition read/write is flash aware
* New encrypted write function
2016-12-01 23:49:12 -08:00
Jiang Jiang Jian bd20288b81 Merge branch 'feature/btdm_bluedroid' into 'master'
Feature/btdm bluedroid

This branch contain the bluedroid host code.
Currently,  Only GAP/GATT SERVER/GATT CLIENT release to users.
Actually, the content of the codes is further more than GAP/GATT and etc.
In this release version, users only need to concern about the APIs which are in "api/include/".

Now, suggestions in comment have been resolved are following:
1. The APIs use callback function. Ivan , Jeroen and me have discussed it. Currently the code will not be changed.
2. The APIs use OPEN/CLOSE. I have ask Ivan, besides bluedroid do this, we will keep the name.
3. Coding style. I have run format.sh to handle the style. And some spell error have been fixed.
4. APIs doxygen. I have clean the warning by doxygen. But bt.rst is still need to be completed.
5. Other comment without resolved face to face that I have to add response in the comment and fix them in the code
6. Fix some incorrect things. See the git log for details.

This 1st version of bluedroid release still have lots of things to do. But it can be done after this merge.
1. Compelete the BLUFI(Bluetooth config wifi connection) documents, security, application protocol and other.
2. Add SPP-LIKE profile.
3. Do more examples codes to cover most of the APIs.
4. Test and fix bug.

Another thing:
1. Do the document of APIs.(xml->bt.rst->html) 
(I will do this before merge as Ivan's suggestion)
This is already done. Besides, the union type in doxygen have something error. Ivan will fix it.



See merge request !239
2016-12-02 12:07:20 +08:00
shangke e0040af7e5 ethernet: add first version of ethernet driver 2016-12-01 19:17:48 +08:00
Xia Xiaotian ad555d68d3 esp32/lwip: add check sleep
1. fix tw8911 sleep in scan leads to auth frame malloc fail.

2. fix tw8913 pm state transfer wrong leads to wdt.

3. make some comments for modem sleep and wpa2 enterprise.

4. removd duplicated debug option ESP_THREAD_SAFE_DEBUG
2016-12-01 13:34:36 +08:00
Tian Hao 5a9801aca7 Merge branch 'master' into feature/btdm_bluedroid
# Conflicts:
#	components/esp32/cpu_freq.c
#	components/esp32/lib
2016-11-29 18:38:37 +08:00
Angus Gratton 01e94998c4 Merge branch 'bugfix/mbedtls_sha384' into 'master'
Bugfix mbedtls sha384 clone()

mbedtls_sha512_clone() on a SHA-384 hash caused incorrect digest

Also adds additional mbedtls unit tests into the unit tests project (including one for this bug).

See merge request !252
2016-11-29 03:16:30 +08:00
Wu Jian Gang db1e86b3d9 Merge branch 'feature/modem_sleep' into 'master'
Feature/modem sleep



See merge request !251
2016-11-25 19:32:03 +08:00
Wu Jian Gang 3f27c09728 Merge branch 'feature/wpa2_enterprise' into 'master'
Feature/wpa2 enterprise



See merge request !250
2016-11-25 18:46:29 +08:00
Xia Xiaotian 6e3b7f4ea2 wpa2 enterprise: change wpa2 enterprise APIs to esp_wifi_sta_wpa2_ent_XXX 2016-11-25 18:08:21 +08:00
Angus Gratton 88b264cfce mbedTLS SHA: Fix cloning of SHA-384 digests
Hardware unit only reads 384 bits of state for SHA-384 LOAD,
which is enough for final digest but not enough if you plan to
resume digest in software.
2016-11-25 19:26:30 +11:00
Xia Xiaotian 16f2b119eb Merge branch 'master' into feature/modem_sleep
Conflicts:
	components/esp32/lib
2016-11-25 15:54:00 +08:00
Xia Xiaotian 0dbc11e37d wpa2 enterprise: update wpa2 enterprise API comments 2016-11-25 11:03:33 +08:00
Angus Gratton d0801fdbab Merge branch 'feature/sha_tls_integration' into 'master'
SHA acceleration integrated to mbedTLS incl. TLS sessions

Uses hardware SHA acceleration where available, fails over to software where not available.

Ref TW7112

See merge request !232
2016-11-25 10:12:29 +08:00
Angus Gratton 9f9d92b2df Merge branch 'bugfix/spi_flash_region' into 'master'
spi_flash_erase_range: Allow for 32KB blocks not 64KB blocks

SPI flash hardware sends 52h command, which is a 32KB erase.

There is a matching bug in the ROM SPIEraseArea code, unless
flashchip->block_size is modified first.

See merge request !249
2016-11-25 10:11:51 +08:00
Wang Jia Lin 35ae2cd1a5 Merge branch 'driver_merge_tmp/merge_pcnt' into 'master'
driver: PCNT

1. add PCNT module in periph_ctrl.c/.h
2. add description of PCNT status in pcnt_struct.h
3. add PCNT driver code
4. add PCNT example code.

See merge request !229
2016-11-25 00:41:16 +08:00
Xia Xiaotian 1cdd082a9e wpa2 enterprise: update wifi lib in master branch 2016-11-24 20:41:44 +08:00
Tian Hao b5f03a36d5 component/bt : fix sw coexit call mistake 2016-11-24 20:09:52 +08:00
Tian Hao 55e0690f69 component/bt : wifi/bt software coexist option
1. option of sw coexist
2. cpu set freq function modify
3. update lib
4. ld add static data address
2016-11-24 19:57:47 +08:00
Xia Xiaotian b649b48eae Merge branch 'master' into feature/wpa2_enterprise
add lib
2016-11-24 19:35:30 +08:00
Tian Hao 7a41ab6982 Merge branch 'master' into feature/btdm_bluedroid
1. update bt lib submodule

# Conflicts:
#	components/bootloader/src/main/esp32.bootloader.ld
#	components/bt/component.mk
#	components/esp32/component.mk
#	components/esp32/lib
2016-11-24 15:45:04 +08:00
Angus Gratton be53a6950c spi_flash_erase_range: Allow for 32KB blocks not 64KB blocks
SPI flash hardware sends 52h command, which is a 32KB erase.

There is a matching bug in the ROM SPIEraseArea code, unless
flashchip->block_size is modified first.
2016-11-24 18:05:06 +11:00
Wangjialin f97f198c9d driver: improve pulse counter code
1. Modify some comments in pcnt.h
2. Modify api/pcnt.rst
3. Improve example code.
4. Add status definitions in pcnt_reg.h
2016-11-24 12:01:21 +08:00
Wangjialin 6db1482cd5 Merge branch 'master' into driver_merge_tmp/merge_pcnt
# Conflicts:
#	components/driver/include/driver/periph_ctrl.h
2016-11-23 18:15:54 +08:00
Xia Xiaotian f7aeef7111 Merge branch 'master' into feature/wpa2_enterprise 2016-11-23 16:34:01 +08:00
Xia Xiaotian f7fb8b264f wpa2 enterprise: update wpa2 enterprise APIs 2016-11-23 15:29:01 +08:00
Ivan Grokhotkov df6edb50e9 implement esp_deep_sleep, fix build issues 2016-11-22 21:54:49 +08:00